|
|
A037527
|
|
Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 2,1,0.
|
|
0
|
|
|
2, 21, 210, 2102, 21021, 210210, 2102102, 21021021, 210210210, 2102102102, 21021021021, 210210210210, 2102102102102, 21021021021021, 210210210210210, 2102102102102102, 21021021021021021, 210210210210210210, 2102102102102102102, 21021021021021021021
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(2+x) / ( (x-1)*(10*x-1)*(1+x+x^2) ). - R. J. Mathar, Nov 21 2011
a(1)=2, a(2)=21, a(3)=210, a(4)=2102, a(n) = 10*a(n-1) + a(n-3) - 10*a(n-4). - Harvey P. Dale, Jan 02 2013
|
|
MATHEMATICA
|
Module[{nn=30, c}, c=PadRight[{}, nn, {2, 1, 0}]; Table[FromDigits[Take[c, n]], {n, nn}]] (* or *) LinearRecurrence[{10, 0, 1, -10}, {2, 21, 210, 2102}, 30] (* Harvey P. Dale, Jan 02 2013 *)
|
|
PROG
|
(PARI) Vec(x*(2+x)/((x-1)*(10*x-1)*(1+x+x^2)) + O(x^25)) \\ Jinyuan Wang, Apr 14 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|