A096230 Period 5: repeat [9, 7, 5, 3, 1].
9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).
Programs
-
Magma
&cat [[9, 7, 5, 3, 1]: n in [0..20]]; // Vincenzo Librandi, Jul 16 2015
-
Maple
map(op,[[9,7,5,3,1]$20]); # Robert Israel, Jul 16 2015
-
Mathematica
Table[2 Mod[-n, 5] + 1, {n, 105}] (* Robert G. Wilson v, Jul 31 2004 *) PadRight[{}, 120, {9, 7, 5, 3, 1}] (* Harvey P. Dale, Dec 19 2012 *)
-
PARI
a(n) = 9 - 2*(n-1)%10; \\ Charles R Greathouse IV, Aug 25 2014
Formula
a(n) = 1 + 2*(-n mod 5). [From Wilson Mathematica program (2004)]
a(n) = 9 - (2*(n-1) mod 10). [From Greathouse PARI program (2014)]
From Robert Israel, Jul 16 2015: (Start)
G.f.: (9 + 7*x + 5*x^2 + 3*x^3 + x^4)/(1 - x^5).
a(n) = a(n-5).
a(n) + a((a(n)+1)/2) = 10. (End)
Extensions
Edited by N. J. A. Sloane and Robert G. Wilson v, Jul 31 2004
Comments