|
|
A037559
|
|
Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 2,1,1.
|
|
3
|
|
|
2, 21, 211, 2112, 21121, 211211, 2112112, 21121121, 211211211, 2112112112, 21121121121, 211211211211, 2112112112112, 21121121121121, 211211211211211, 2112112112112112
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(2+x+x^2) / ((1-x)*(1-10*x)*(1+x+x^2)). - R. J. Mathar, Nov 21 2011
|
|
MATHEMATICA
|
Table[FromDigits[PadRight[{}, n, {2, 1, 1}]], {n, 20}] (* Harvey P. Dale, Jul 15 2019 *)
|
|
PROG
|
(PARI) Vec(x*(2+x+x^2) / ((x-1)*(10*x-1)*(1+x+x^2)) + O(x^25)) \\ Jinyuan Wang, Apr 14 2020
(Magma) I:=[2, 21, 211, 2112]; [n le 4 select I[n] else 10*Self(n-1) +Self(n-3) -10*Self(n-4): n in [1..40]]; // G. C. Greubel, Oct 18 2022
(SageMath)
def A037559(n): return (633*10^n -444 -27*(7*chebyshev_U(n, -1/2) + 3*chebyshev_U(n-1, -1/2)))/2997
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|