OFFSET
1,4
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0, 20, 0, -99).
FORMULA
a(n)=20*a(n-2)-99*a(n-4). G.f.: -x^2*(-1-x+10*x^2)/((3*x-1)*(3*x+1)*(11*x^2-1)). - R. J. Mathar, Jul 13 2009
EXAMPLE
As pairs:
0, 1
1, 10
20, 101
301, 1030
4040, 10601
51001, 110050
620060, 1151501
7352101, 12135070
85656080, 128702801
MATHEMATICA
nxt[{n_, a_, b_, c_}]:={n+1, b, c, If[OddQ[n], c+10b, a+10b]}; NestList[nxt, {2, 0, 1, 1}, 30][[All, 2]] (* Harvey P. Dale, May 03 2018 *)
(* Alternative: *)
LinearRecurrence[{0, 20, 0, -99}, {0, 1, 1, 10}, 30] (* Harvey P. Dale, May 03 2018 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -99, 0, 20, 0]^(n-1)*[0; 1; 1; 10])[1, 1] \\ Charles R Greathouse IV, May 30 2026
CROSSREFS
KEYWORD
nonn,less,easy
AUTHOR
Mark Dols, Jun 24 2009, Jun 28 2009, Jul 13 2009
EXTENSIONS
Edited by N. J. A. Sloane, Jun 30 2009
NAME adapted to offset. - R. J. Mathar, Jun 19 2021
STATUS
approved
