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.

A201208 One 1, two 2's, three 1's, four 2's, five 1's, ...

Original entry on oeis.org

1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Paul Curtz, Nov 28 2011

Keywords

Examples

			May be written as a triangle:
  1
  2 2
  1 1 1
  2 2 2 2
  1 1 1 1 1
  2 2 2 2 2 2
  1 1 1 1 1 1 1
Row sums are A022998(n+1).
		

Crossrefs

Programs

  • Haskell
    a201208 n = a201208_list !! (n-1)
    a201208_list = concat $ zipWith ($) (map replicate [1..]) a000034_list
    -- Reinhard Zumkeller, Dec 02 2011
  • Mathematica
    ReplaceAll[ColumnForm[Table[Mod[k, 2], {k, 12}, {n, k}], Center], 0 -> 2] (* Alonso del Arte, Nov 28 2011 *)

Formula

a(n) = A057212(n) + 1. - T. D. Noe, Nov 28 2011

Extensions

Edited by N. J. A. Sloane, Dec 02 2011