A010717 Period 2: repeat (5,6).
5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Programs
-
Maple
A010717:= n -> 5 + (n mod 2): seq(A010717(n),n=0..10); # Robert Israel, Jul 17 2014
-
Mathematica
Table[5 + Mod[n, 2], {n, 0, 50}] (* Jinyuan Wang, Feb 26 2020 *)
-
PARI
contfrac(5/2+sqrt(precision(255.,150))/6) \\ Note: Depending on the chosen precision, the last term may be off by +/- 1, so it would be safer to discard it, e.g., using vecextract(...,"^-1"). - M. F. Hasler, Sep 25 2013
-
PARI
a(n)=n%2+5 \\ Charles R Greathouse IV, Jul 13 2016
Formula
From Vincenzo Librandi, Aug 01 2010: (Start)
a(n) = a(n-2) for n>1; a(0)=5, a(1)=6.
G.f.: (5+6*x)/((1-x)*(1+x)). (End)
a(n) = floor(11*(n+1)/2) - floor(11*n/2). - James Van Alstine, Jul 17 2014
Comments