OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (10,0,0,1,-10).
FORMULA
a(0)=1, a(1)=12, a(2)=123, a(3)=1230, a(4)=12301, a(n) = 10*a(n-1) + a(n-4) - 10*a(n-5). - Harvey P. Dale, Jun 07 2011
G.f.: x*(1+2*x+3*x^2) / ( (x-1)*(10*x-1)*(1+x)*(x^2+1) ). - R. J. Mathar, Aug 12 2013
MATHEMATICA
Rest[RecurrenceTable[{a[0]==0, a[n]==10a[n-1]+Mod[n, 4]}, a[n], {n, 20}]] (* or *) LinearRecurrence[{10, 0, 0, 1, -10}, {1, 12, 123, 1230, 12301}, 20] (* Harvey P. Dale, Jun 07 2011 *)
PROG
(PARI) Vec(x*(1+2*x+3*x^2)/((x-1)*(10*x-1)*(1+x)*(x^2+1)) + O(x^25)) \\ Jinyuan Wang, Apr 14 2020
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Harvey P. Dale, Jun 07 2011
STATUS
approved