|
|
A131369
|
|
Period 10: repeat [5, 4, 5, 4, 3, 4, 5, 4, 5, 0].
|
|
1
|
|
|
5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3, 4, 5, 4, 5, 0, 5, 4, 5, 4, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Differences: [-1, 1, -1, -1, 1, 1, -1, 1, -5, 5].
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
|
|
FORMULA
|
G.f.: (5+4*x+5*x^2+4*x^3+3*x^4+4*x^5+5*x^6+4*x^7+5*x^8)/(1-x^10).
a(n) = a(n-10), n>9.
a(n) = (9+(-1)^n)/2+((-1)^n-3)*(floor((n+1)/5)-floor(n/5)). (End)
|
|
MAPLE
|
A131369:=n->[5, 4, 5, 4, 3, 4, 5, 4, 5, 0][(n mod 10)+1]: seq(A131369(n), n=0..100); # Wesley Ivan Hurt, Aug 29 2015
|
|
MATHEMATICA
|
CoefficientList[Series[(5 + 4 x + 5 x^2 + 4 x^3 + 3 x^4 + 4 x^5 + 5 x^6 + 4 x^7 + 5 x^8)/(1 - x^10), {x, 0, 100}], x] (* or *) LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {5, 4, 5, 4, 3, 4, 5, 4, 5, 0}, 100] (* Wesley Ivan Hurt, Aug 29 2015 *)
|
|
PROG
|
(Magma) I:=[5, 4, 5, 4, 3, 4, 5, 4, 5, 0]; [n le 10 select I[n] else Self(n-10): n in [1..100]]; // Wesley Ivan Hurt, Aug 29 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|