A010697 Period 2: repeat (2,7).
2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Programs
-
Mathematica
Table[-5/2*(-1)^n + 9/2, {n, 0, 120}] (* or *) Table[7 Mod[n, 2] + 2 Mod[(n + 1), 2], {n, 0, 120}] (* or *) CoefficientList[Series[(2 + 7 x)/((1 - x) (1 + x)), {x, 0, 120}], x] (* or *) Table[NestWhile[Total@ IntegerDigits@ # &, 2^n + 5^n, IntegerLength@ # > 1 &], {n, 0, 120}] (* Michael De Vlieger, Jul 13 2016 *)
-
PARI
a(n)=if(n%2,7,2) \\ Charles R Greathouse IV, Oct 07 2015
Formula
G.f.: (2+7x)/((1-x)(1+x)). - R. J. Mathar, Nov 21 2011
E.g.f.: 7*sinh(x) + 2*cosh(x). - Ilya Gutkovskiy, Jul 14 2016
a(n) = 14/a(n-1). - Nicolas Bělohoubek, Nov 11 2021
Comments