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, ...

This page as a plain text file.
%I A201208 #25 Mar 15 2023 14:03:05
%S A201208 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,
%T A201208 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,
%U A201208 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
%N A201208 One 1, two 2's, three 1's, four 2's, five 1's, ...
%F A201208 a(n) = A057212(n) + 1. - _T. D. Noe_, Nov 28 2011
%e A201208 May be written as a triangle:
%e A201208   1
%e A201208   2 2
%e A201208   1 1 1
%e A201208   2 2 2 2
%e A201208   1 1 1 1 1
%e A201208   2 2 2 2 2 2
%e A201208   1 1 1 1 1 1 1
%e A201208 Row sums are A022998(n+1).
%t A201208 ReplaceAll[ColumnForm[Table[Mod[k, 2], {k, 12}, {n, k}], Center], 0 -> 2] (* _Alonso del Arte_, Nov 28 2011 *)
%o A201208 (Haskell)
%o A201208 a201208 n = a201208_list !! (n-1)
%o A201208 a201208_list = concat $ zipWith ($) (map replicate [1..]) a000034_list
%o A201208 -- _Reinhard Zumkeller_, Dec 02 2011
%Y A201208 Cf. A057212, A022998.
%Y A201208 Cf. A000034.
%K A201208 nonn,tabl,easy
%O A201208 1,2
%A A201208 _Paul Curtz_, Nov 28 2011
%E A201208 Edited by _N. J. A. Sloane_, Dec 02 2011