OFFSET
0,1
COMMENTS
a(n) <= A051900(n), with equality for n=3,5,7,8,13,15. - Robert Israel, Apr 26 2017
LINKS
Giovanni Resta, Table of n, a(n) for n = 0..40
EXAMPLE
a(9) = 2048 because 2047 = 23 * 89, 2048 = 2^11 and 11 - 2 = 9.
MAPLE
with(numtheory): P:=proc(q) local a, b, k, v; v:=array(0..100);
for k from 0 to 100 do v[k]:=0; od; a:=0;
for k from 2 to q do b:=bigomega(k); if v[abs(b-a)]=0 then v[abs(b-a)]:=k; fi; a:=b; od; k:=0;
while v[k]>0 do print(v[k]); k:=k+1; od; print(); end: P(10^6);
MATHEMATICA
s = PrimeOmega@ Range[10^6]; 1 + First /@ Values@ KeySort@ PositionIndex@ Flatten@ Map[Abs@ Differences@ # &, Partition[s, 2, 1]] (* Michael De Vlieger, Apr 26 2017, Version 10 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Apr 26 2017
EXTENSIONS
a(24)-a(32) from Giovanni Resta, Apr 26 2017
STATUS
approved