login
A215151
a(1) = 1; thereafter a(n+1) = 0 if bigomega(n) = bigomega(2^a(n)+n), otherwise a(n+1) = a(n)+1.
1
1, 2, 3, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0, 0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 1, 0, 1, 2, 0, 1, 2, 3, 4, 5, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 1, 0, 1, 2, 0, 1, 0, 0, 1, 2, 0, 0, 1, 2, 3, 0, 1
OFFSET
1,2
EXAMPLE
a(2)=2 (=a(1)+1) because A001222(1)=0 < A001222(2^1+1)=A001222(3)=1;
a(3)=3 (=a(2)+1) because A001222(2)=1 < A001222(2^2+2)=A001222(6)=2;
a(4)=0 (=0) because A001222(3)=1 = A001222(2^3+3)=A001222(11)=1;
a(5)=1 (=a(4)+1) because A001222(4)=2 > A001222(2^0+4)=A001222(5)=1;
a(6)=0 (=0) because A001222(5)=1 = A001222(2^1+5)=A001222(7)=1;
a(7)=1 (=a(6)+1) because A001222(6)=2 > A001222(2^0+6)=A001222(7)=1;
a(8)=2 (=a(7)+1) because A001222(7)=1 < A001222(2^1+7)=A001222(9)=2;
a(9)=0 (=0) because A001222(8)=3 = A001222(2^2+8)=A001222(12)=3.
MAPLE
A215151 := proc(n)
option remember;
if n = 1 then
1;
elif numtheory[bigomega](n-1) = numtheory[bigomega](2^procname(n-1)+n-1) then
0 ;
else
procname(n-1)+1 ;
end if;
end proc: # R. J. Mathar, Aug 07 2012
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[PrimeOmega[n]==PrimeOmega[2^a+n], 0, a+1]}; Transpose[ NestList[nxt, {1, 1}, 110]][[2]] (* Harvey P. Dale, Jun 17 2015 *)
CROSSREFS
Sequence in context: A123343 A054439 A318656 * A305806 A064722 A259748
KEYWORD
nonn,less
AUTHOR
Gerasimov Sergey, Aug 04 2012
STATUS
approved