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.

A045671 Extension of Beatty sequence; complement of A045672.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 63, 64, 65, 66, 67, 69, 70
Offset: 0

Views

Author

Keywords

Comments

Sequence can also be characterized by a special numeration system-see above reference.
(s,t)-sequences; the case s=2, t=2.
For n>=1, these are the positions of 1 in the fixed point of the morphism 0->11, 1->1110; see A285671. Conjecture: -1 < n*r - a(n) < 2 for n>=0, where r = (1 + sqrt(17))/4. - Clark Kimberling, May 02 2017

Crossrefs

Programs

  • Mathematica
    s=2; t=2;
    mex:=First[Complement[Range[1,Max[#1]+1],#1]]&;
    a[0]=0; b[n_]:=b[n]=s*a[n]+t*n;
    a[n_]:=a[n]=mex[Flatten[Table[{a[i],b[i]},{i,0,n-1}]]];
    Table[a[n],{n,200}] (* A045671 *)
    Table[b[n],{n,200}] (* A045672 *)
    (* Clark Kimberling, Apr 02 2011 *)
    s = Nest[Flatten[# /. {0 -> {1, 1}, 1 -> {1, 1, 1, 0}}] &, {0}, 10]; (* A285671 *)
    Flatten[Position[s, 0]];  (* A045672 *)
    Flatten[Position[s, 1]];  (* A045671 *)
    (* - Clark Kimberling, May 02 2017 *)

Formula

a(n) = mex{a(i), b(i):0 <= iA045672, mex S=least integer >= 0 not in sequence S.
a(n) = (1+sqrt(17))/4*n+O(1). - Benoit Cloitre, Apr 23 2008