OFFSET
1,1
COMMENTS
EXAMPLE
a(4) = 43 because 43 is prime, 2*43 + 1 = 87 = 3 * 29 has 2 prime factors, 2*87 + 1 = 175 = 5^2*7 has 3, and 2*175 + 1 = 351 = 3^3 * 13 has 4, but 2*351 + 1 = 703 = 19 * 37 has only 2.
MAPLE
f:= proc(n) local x, m, i;
m:= numtheory:-bigomega(n); x:= n;
for i from 1 do
x:= 2*x+1;
if numtheory:-bigomega(x) <> m+i then return i fi
od
end proc:
N:= 6: V:= Vector(N): count:= 0:
for i from 1 while count < N do
r:= f(i);
if r <= N and V[r] = 0 then V[r]:= i; count:= count+1 fi;
od:
convert(V, list);
CROSSREFS
KEYWORD
nonn,more,new
AUTHOR
Robert Israel, Feb 25 2025
STATUS
approved