OFFSET
0,2
COMMENTS
Scale and initial conditions changed compared to the reference to get integer output.
REFERENCES
Taylor Booth, Sequential Machines and Automata Theory, John Wiley and Sons, New York, 1967, Pages 454-455.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5, 0, 45, -225).
FORMULA
G.f.: 4*x*(1+x-15*x^2)/((1-5*x)*(1-45*x^3)). [Sep 28 2009]
a(n) = (1/4)*(3*5^n - 3*b(n) + b(n-1) + 21*b(n-2)), where b(n) = (45)^(n/3)*A079978(n). - G. C. Greubel, Jul 30 2022
MATHEMATICA
M = {{1, 4, 0, 0}, {0, 0, 4, 1}, {4, 1, 0, 0}, {0, 0, 1, 4}}; w[0]= {0, 1, 1, 1};
w[n_]:= w[n]= M.w[n-1];
a[n_]:= a[n]= w[n][[1]];
Table[a[n], {n, 0, 50}]
LinearRecurrence[{5, 0, 45, -225}, {0, 4, 24, 60}, 60] (* G. C. Greubel, Jul 30 2022 *)
PROG
(Magma) I:=[0, 4, 24, 60]; [n le 4 select I[n] else 5*Self(n-1) +45*Self(n-3) -225*Self(n-4): n in [1..41]]; // G. C. Greubel, Jul 30 2022
(SageMath)
def b(n): return (45)^(n/3)*( (2^((n%3))%2) )
def a(n): return (1/4)*(3*5^n -3*b(n) +b(n-1) +21*b(n-2))
[a(n) for n in (0..50)] # G. C. Greubel, Jul 30 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Feb 27 2006
EXTENSIONS
Definition replaced by recurrence by the Associate Editors of the OEIS, Sep 28 2009
STATUS
approved