login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
0,1
COMMENTS
Differences: [-1, 1, -1, -1, 1, 1, -1, 1, -5, 5].
FORMULA
From Wesley Ivan Hurt, Aug 29 2015: (Start)
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
Sequence in context: A361803 A344124 A237577 * A122219 A093348 A262604
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 30 2007
STATUS
approved