login
Period 5: repeat [1, 3, 5, 7, 9].
2

%I #50 Mar 19 2024 09:31:18

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

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

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

%N Period 5: repeat [1, 3, 5, 7, 9].

%C Final digits of odd numbers in decimal representation: a(n) = A010879(A005408(n)). - _Reinhard Zumkeller_, Apr 11 2010

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

%F a(n) = 2*(n mod 5) + 1, see PARI code. - _Bruno Berselli_, Jul 25 2018

%F G.f.: -((9*x^4 + 7*x^3 + 5*x^2 + 3*x + 1)/(x^5 - 1)). - _Kritsada Moomuang_, Sep 06 2018

%F a(n) = a(n - 5) for n > 4. - _Stefano Spezia_, Sep 07 2018

%t PadRight[{},120,{1,3,5,7,9}] (* _Harvey P. Dale_, May 06 2014 *)

%t LinearRecurrence[{0, 0, 0, 0, 1}, {1, 3, 5, 7, 9}, 50] (* or *)

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

%o (PARI) a(n)=1+2*(n%5) \\ _Jaume Oliver Lafont_, Aug 28 2009

%o (Magma) &cat [[1, 3, 5,7,9]^^25]; // _Vincenzo Librandi_, Jul 25 2018

%K nonn,easy

%O 0,2

%A _Paul Curtz_, Aug 11 2008