login

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

Periodic {2, -1, 1, 0, 0} - 0^n.
2

%I #23 Dec 14 2023 05:26:56

%S 1,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,

%T -1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,

%U 1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0,0,2,-1,1,0

%N Periodic {2, -1, 1, 0, 0} - 0^n.

%C For this entry, it is understood that 0^0 = 1 and 0^n = 0 for all n > 0. - _Alonso del Arte_, Mar 18 2018

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

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

%F From _G. C. Greubel_, Jun 03 2021: (Start)

%F a(n) = A117450(n) - 2*A117450(n-1) + A117450(n-2) (second difference of A117450).

%F a(n) = A117451(n) - A117451(n-1). (End)

%t ReplaceAll[3 -> -1][RealDigits[464 + 240/341, 4, 100][[1]]] (* _Alonso del Arte_, Mar 18 2018 *)

%t LinearRecurrence[{0,0,0,0,1},{1,-1,1,0,0,2},120] (* or *) PadRight[{1},120,{2,-1,1,0,0}] (* _Harvey P. Dale_, Jun 25 2023 *)

%Y Partial sums are A117451. Second partial sums are A117450.

%K easy,sign

%O 0,6

%A _Paul Barry_, Mar 16 2006