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.

A079948 First differences of A079000.

Original entry on oeis.org

3, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Feb 22 2003

Keywords

Comments

Alternate description of sequence: start with a(1)=3; apply 1->2, 2->11, 3->21; iterate. - Matthew Vandermast, Mar 08 2003

References

  • N. J. A. Sloane, Seven Staggering Sequences, in Homage to a Pied Puzzler, E. Pegg Jr., A. H. Schoen and T. Rodgers (editors), A. K. Peters, Wellesley, MA, 2009, pp. 93-110.

Programs

  • Mathematica
    b[1] = 1; b[n_] := (k = Floor[Log[2, (n+3)/6]]; j = n - (9*2^k-3); 12*2^k - 3 + 3*j/2 + Abs[j]/2); Array[b, 106] // Differences (* Jean-François Alcover, Sep 02 2018 *)

Formula

After first two terms, a run of length 3*2^k 1's followed by a run of length 3*2^k 2's, for k = 0, 1, ...
a(n) = floor(log_2(8*(floor((n+3)/3))/3)) - floor(log_2(floor((n+3)/3))) for n>2; with a(1)=3 and a(2)=2. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 22 2003
Also a(n) = A079882(A002264(n+3)) for n>2, where A002264=floor(n/3). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 22 2003