|
|
A057211
|
|
Alternating runs of ones and zeros, where the n-th run has length n.
|
|
12
|
|
|
1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Seen as a triangle read by rows: T(n,k) = n mod 2, 1<=k<=n. - Reinhard Zumkeller, Mar 18 2011
|
|
REFERENCES
|
K. H. Rosen, Discrete Mathematics and its Applications, 1999, Fourth Edition, page 79, exercise 10 (g).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (1-(-1)^A002024(n))/2, where A002024(n)=round(sqrt(2*n)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 23 2003
G.f.: x/(1-x)*sum_{n>=0} (-1)^n*x^(n*(n+1)/2). - Mircea Merca, Mar 05 2014
|
|
MAPLE
|
# alternative Maple program:
T:= n-> [irem(n, 2)$n][]:
|
|
MATHEMATICA
|
Flatten[Table[{PadRight[{}, n, 1], PadRight[{}, n+1, 0]}, {n, 1, 21, 2}]] (* Harvey P. Dale, Jun 07 2015 *)
|
|
PROG
|
(Haskell)
a057211 n = a057211_list !! (n-1)
a057211_list = concat $ zipWith ($) (map replicate [1..]) a059841_list
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
Ben Tyner (tyner(AT)phys.ufl.edu), Sep 27 2000
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|