OFFSET
0,2
COMMENTS
LINKS
Eric Weisstein's World of Mathematics, Substitution System
Index entries for linear recurrences with constant coefficients, signature (6,-6,5)
FORMULA
EXAMPLE
Evolution from initial string "3": 3 -> 31213 -> 3121312321231321232131213 -> ...
Therefore, number of 1’s at step n:
a(0) = 0;
a(1) = 2;
a(2) = 9, etc.
MAPLE
A276508:=n->(2*5^n + 3*(-1)^(floor((n-1)/3)) + (-1)^n)/6: seq(A276508(n), n=0..30); # Wesley Ivan Hurt, Sep 07 2016
MATHEMATICA
Table[(2 5^n + 3 (-1)^Floor[(n - 1)/3] + (-1)^n)/6, {n, 0, 25}]
LinearRecurrence[{6, -6, 5}, {0, 2, 9}, 26]
PROG
(PARI) concat(0, Vec(x*(2-3*x)/((1-5*x)*(1-x+x^2)) + O(x^99))) \\ Altug Alkan, Sep 06 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Sep 06 2016
STATUS
approved