A010732 (17-(-1)^n)/2.
8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Programs
-
Maple
A010732:=n->(17-(-1)^n)/2; seq(A010732(n), n=0..100); # Wesley Ivan Hurt, Apr 16 2014
-
Mathematica
Table[(17 - (-1)^n)/2, {n, 0, 100}] (* Wesley Ivan Hurt, Apr 16 2014 *) LinearRecurrence[{0,1},{8,9},100] (* or *) PadRight[{},100,{8,9}] (* Harvey P. Dale, Aug 05 2025 *)
-
PARI
a(n)=(17-(-1)^n)/2 \\ Charles R Greathouse IV, Oct 07 2015
Formula
Period 2.
G.f.: (-8-9*x) / ((x-1)*(1+x)). - R. J. Mathar, Nov 21 2011
a(n) = 8 + (n mod 2) = 9 - ((n+1) mod 2) = (2 + (n mod 2))^(2 + ((n+1) mod 2)). - Wesley Ivan Hurt, Apr 16 2014