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.

A107751 a(n) = A107750(n+1) - A107750(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2
Offset: 0

Views

Author

Reinhard Zumkeller, May 23 2005

Keywords

Crossrefs

Programs

  • Mathematica
    A107751[ nmax_ ] := Length /@ Split[ (Total[ 1 - IntegerDigits[ #1, 2 ] ] &) /@ Range[ 0, nmax ] ]; A107751[ 200 ] (* Peter Pein (petsie(AT)dordos.net), Oct 12 2007 *)
  • PARI
    up_to = 65537;
    A107751list(up_to) = { my(v=vector(up_to)); v[1]=v[2]=v[3]=v[4]=1; for(n=5,up_to,v[n] = (0^(v[n-1]-1) + 0^(v[n-2]-1))); (v); };
    v107751 = A107751list(up_to);
    A107751(n) = if(!n,1,v107751[n]); \\ Antti Karttunen, Dec 23 2018

Formula

a(n) = if n<=4 then 1 else 0^(a(n-1)-1) + 0^(a(n-2)-1).