cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A215151 a(1) = 1; thereafter a(n+1) = 0 if bigomega(n) = bigomega(2^a(n)+n), otherwise a(n+1) = a(n)+1.

Original entry on oeis.org

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

Views

Author

Gerasimov Sergey, Aug 04 2012

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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 *)