OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (8,-8,8,-7).
FORMULA
a(n) = (1/2)*floor(7^(n+1)/10). - Mircea Merca, Dec 27 2010
a(n) = +8*a(n-1) -8*a(n-2) +8*a(n-3) -7*a(n-4) for n > 4. - R. J. Mathar, Jan 03 2011
a(n) = -1/4 +7^(n+1)/20 -(-1)^floor(n/2)*A000034(n)/10. - R. J. Mathar, Jan 03 2011
G.f.: x*(2+x) / ( (x-1)*(7*x-1)*(x^2+1) ). - R. J. Mathar, Jan 03 2011
MAPLE
seq(1/2*floor(7^n/10), n=2..22); # Mircea Merca, Dec 27 2010
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {2, 3, 1, 0}], 7], {n, 20}] (* or *) LinearRecurrence[ {8, -8, 8, -7}, {2, 17, 120, 840}, 20] (* Harvey P. Dale, Sep 23 2021 *)
PROG
(Magma) Periodic2310:=func< n | &cat[ [ [2, 3, 1, 0][1+(k mod 4)]: k in [0..n-1] ] ] >; /* initial segment of length n */
[ Seqint(Reverse(Periodic2310(n)), 7): n in [1..25] ];
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved