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”).

A079882
A run of 2^n 1's followed by a run of 2^n 2's, for n=0, 1, 2, ...
7
1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 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, 1, 1, 1, 1, 1, 1, 1, 1, 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
OFFSET
0,2
COMMENTS
In the sequence of nonnegative integers (cf. A001477) substitute all n by 2^floor(n/2) occurrences of (1 + n mod 2); a(n)=A173920(n+2,3) for n>0. [From Reinhard Zumkeller, Mar 04 2010]
LINKS
FORMULA
a(n) = floor(log[2](8*(n+2)/3)) - floor(log[2](n+2)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 22 2003
MAPLE
f1 := n->[seq(1, i=1..2^n)]; f2 := n->[seq(2, i=1..2^n)]; s := []; for i from 0 to 10 do s := [op(s), op(f1(i)), op(f2(i))]; od: s;
MATHEMATICA
Table[{PadRight[{}, 2^n, 1], PadRight[{}, 2^n, 2]}, {n, 0, 5}]//Flatten (* Harvey P. Dale, Jul 22 2016 *)
CROSSREFS
Partial sums give A079945. Equals 1 + A079944. Cf. A080584.
First differences of A080637.
Sequence in context: A091243 A306615 A037826 * A362415 A317335 A014709
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Feb 21 2003
STATUS
approved