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.

A055087 Integers 0..n then 0..n then 0..n+1 then 0..n+1 etc.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1
Offset: 0

Views

Author

Michael Somos, Jun 13 2000

Keywords

Comments

Second column in the monotonic justified array of all positive generalized Fibonacci sequences (A160271). see also A199474. - Casey Mongoven, Nov 06 2011
Can also be seen as an irregular triangle with duplicated rows of A002262. - Reinhard Zumkeller, Jul 14 2015

Examples

			0; 0; 0,1; 0,1; 0,1,2; 0,1,2; 0,1,2,3; 0,1,2,3; ...
		

Crossrefs

Cf. A002262.

Programs

  • Haskell
    import Data.List (transpose)
    a055087 n k = a055087_tabf !! n !! k
    a055087_row n = a055087_tabf !! n
    a055087_tabf = concat $ transpose [a002262_tabl, a002262_tabl]
    a055087_list = concat a055087_tabf
    -- Reinhard Zumkeller, Jul 14 2015
  • Mathematica
    With[{nn=10},Flatten[Table[{Range[0,n],Range[0,n]},{n,0,nn}]]] (* Harvey P. Dale, May 30 2015 *)
  • PARI
    {a(n) = (1 + 4*n - sqr( floor( sqrt( 1 + 4*n)))) \ 4}