A141518 Period 5: repeat [1, 3, 5, 7, 9].
1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).
Programs
-
Magma
&cat [[1, 3, 5,7,9]^^25]; // Vincenzo Librandi, Jul 25 2018
-
Mathematica
PadRight[{},120,{1,3,5,7,9}] (* Harvey P. Dale, May 06 2014 *) LinearRecurrence[{0, 0, 0, 0, 1}, {1, 3, 5, 7, 9}, 50] (* or *) CoefficientList[Series[-((9*x^4 + 7*x^3 + 5*x^2 + 3*x + 1)/(x^5 - 1)), {x, 0, 50}], x] (* Stefano Spezia, Sep 07 2018 *)
-
PARI
a(n)=1+2*(n%5) \\ Jaume Oliver Lafont, Aug 28 2009
Formula
a(n) = 2*(n mod 5) + 1, see PARI code. - Bruno Berselli, Jul 25 2018
G.f.: -((9*x^4 + 7*x^3 + 5*x^2 + 3*x + 1)/(x^5 - 1)). - Kritsada Moomuang, Sep 06 2018
a(n) = a(n - 5) for n > 4. - Stefano Spezia, Sep 07 2018
Comments