OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..990
Index entries for linear recurrences with constant coefficients, signature (10,0,1,-10).
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
[A037559(n) for n in range(1, 40)] # G. C. Greubel, Oct 18 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved