|
|
A010710
|
|
Period 2: repeat [4,5].
|
|
9
|
|
|
4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Also, a(n) is the number of binary sequences of length n+3 avoiding the subsequences 000, 001, 011, 111. For example, when n=5 the a(5)=5 sequences of length 8 are 01010101, 10101010, 01010100, 11010101, 11010100. - Miquel A. Fiol, Dec 28 2023
|
|
LINKS
|
|
|
FORMULA
|
a(n+2) = a(n).
a(n+1) = a(n) + (-1)^n.
a(n) = (9-(-1)^n)/2. (End)
|
|
MATHEMATICA
|
a[n_]:=-(1/2)*(-1)^n + 9/2; Array[a, 50, {0, 49}]
a[n_]:=Floor[9*(n+1)/2] - Floor[9*n/2]; Array[a, 50, {0, 49}]
a[n_]:= 4 + Mod[n, 2]; Array[a, 50, {0, 49}]
LinearRecurrence[{0, 1}, {4, 5}, 50]
CoefficientList[Series[(4+5*x)/(1-x^2), {x, 0, 50}], x]
(End)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|