login
a(n) = A000975(n) mod 10.
0

%I #27 Jan 01 2024 11:27:19

%S 0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,

%T 2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,

%U 0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0

%N a(n) = A000975(n) mod 10.

%C A000975(0), A000975(1), A000975(2), A000975(3) repeating.

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

%F G.f.: x*(1 + 2*x + 5*x^2)/(1 - x^4).

%F E.g.f.: 2*exp(x) - exp(-x) - cos(x) - 2*sin(x).

%F a(n) = 2 - (-1)^n - cos(Pi*n/2) - 2*sin(Pi*n/2).

%F a(n+4) = a(n). - _G. C. Greubel_, Sep 26 2017

%F 2*a(n) = (n mod 2) + (n mod 4)^2. - _Bruno Berselli_, Oct 18 2018

%t CoefficientList[Series[x (1 + 2 x + 5 x^2)/(1 - x^4), {x, 0, 50}], x] (* _G. C. Greubel_, Sep 26 2017 *)

%t PadRight[{},120,{0,1,2,5}] (* _Harvey P. Dale_, Apr 30 2022 *)

%o (PARI) x='x+O('x^50); Vec(x*(1+2*x+5*x^2)/(1-x^4)) \\ _G. C. Greubel_, Sep 26 2017

%K nonn,easy

%O 0,3

%A _Paul Barry_, Dec 18 2003