A037487 Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 1,2.
1, 12, 121, 1212, 12121, 121212, 1212121, 12121212, 121212121, 1212121212, 12121212121, 121212121212, 1212121212121, 12121212121212, 121212121212121, 1212121212121212, 12121212121212121, 121212121212121212, 1212121212121212121, 12121212121212121212
Offset: 1
Links
- Hieronymus Fischer, Table of n, a(n) for n = 1..200
- Index entries for linear recurrences with constant coefficients, signature (10,1,-10).
Crossrefs
Cf. A037610.
Programs
-
Mathematica
Table[FromDigits[PadRight[{},n,{1,2}]],{n,20}] (* or *) LinearRecurrence[ {10,1,-10},{1,12,121},20] (* Harvey P. Dale, Jun 21 2016 *)
-
PARI
A037487(n)=10^n*4\33 \\ - M. F. Hasler, Jan 13 2013
-
PARI
Vec(x*(2*x+1)/((x-1)*(x+1)*(10*x-1)) + O(x^100)) \\ Colin Barker, Apr 30 2014
Formula
a(n) = floor((4/33)*10^n). - Hieronymus Fischer, Jan 03 2013
a(n) = 10*a(n-1)+a(n-2)-10*a(n-3). G.f.: x*(2*x+1) / ((x-1)*(x+1)*(10*x-1)). - Colin Barker, Apr 30 2014
Comments