login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Period 10: repeat [5, 4, 5, 4, 3, 4, 5, 4, 5, 0].
1

%I #12 Dec 12 2023 09:24:52

%S 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,

%T 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,

%U 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

%N Period 10: repeat [5, 4, 5, 4, 3, 4, 5, 4, 5, 0].

%C Differences: [-1, 1, -1, -1, 1, 1, -1, 1, -5, 5].

%H <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,0,0,1).

%F From _Wesley Ivan Hurt_, Aug 29 2015: (Start)

%F 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).

%F a(n) = a(n-10), n>9.

%F a(n) = (9+(-1)^n)/2+((-1)^n-3)*(floor((n+1)/5)-floor(n/5)). (End)

%p 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

%t 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 *)

%o (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

%K nonn,easy

%O 0,1

%A _Paul Curtz_, Sep 30 2007