login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #25 Mar 15 2023 14:03:05

%S 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 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 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 One 1, two 2's, three 1's, four 2's, five 1's, ...

%F a(n) = A057212(n) + 1. - _T. D. Noe_, Nov 28 2011

%e May be written as a triangle:

%e 1

%e 2 2

%e 1 1 1

%e 2 2 2 2

%e 1 1 1 1 1

%e 2 2 2 2 2 2

%e 1 1 1 1 1 1 1

%e Row sums are A022998(n+1).

%t ReplaceAll[ColumnForm[Table[Mod[k, 2], {k, 12}, {n, k}], Center], 0 -> 2] (* _Alonso del Arte_, Nov 28 2011 *)

%o (Haskell)

%o a201208 n = a201208_list !! (n-1)

%o a201208_list = concat $ zipWith ($) (map replicate [1..]) a000034_list

%o -- _Reinhard Zumkeller_, Dec 02 2011

%Y Cf. A057212, A022998.

%Y Cf. A000034.

%K nonn,tabl,easy

%O 1,2

%A _Paul Curtz_, Nov 28 2011

%E Edited by _N. J. A. Sloane_, Dec 02 2011