cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A037559 Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 2,1,1.

This page as a plain text file.
%I A037559 #31 Dec 14 2023 05:34:24
%S A037559 2,21,211,2112,21121,211211,2112112,21121121,211211211,2112112112,
%T A037559 21121121121,211211211211,2112112112112,21121121121121,
%U A037559 211211211211211,2112112112112112
%N A037559 Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 2,1,1.
%H A037559 G. C. Greubel, <a href="/A037559/b037559.txt">Table of n, a(n) for n = 1..990</a>
%H A037559 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (10,0,1,-10).
%F A037559 G.f.: x*(2+x+x^2) / ((1-x)*(1-10*x)*(1+x+x^2)). - _R. J. Mathar_, Nov 21 2011
%F A037559 a(n) = (633*10^n - 444 - 27*( 7*A049347(n) + 3*A049347(n-1) ))/2997. - _G. C. Greubel_, Oct 18 2022
%t A037559 Table[FromDigits[PadRight[{},n,{2,1,1}]],{n,20}] (* _Harvey P. Dale_, Jul 15 2019 *)
%o A037559 (PARI) Vec(x*(2+x+x^2) / ((x-1)*(10*x-1)*(1+x+x^2)) + O(x^25)) \\ _Jinyuan Wang_, Apr 14 2020
%o A037559 (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
%o A037559 (SageMath)
%o A037559 def A037559(n): return (633*10^n -444 -27*(7*chebyshev_U(n, -1/2) + 3*chebyshev_U(n-1, -1/2)))/2997
%o A037559 [A037559(n) for n in range(1,40)] # _G. C. Greubel_, Oct 18 2022
%Y A037559 Cf. A049347.
%K A037559 nonn,base,easy
%O A037559 1,1
%A A037559 _Clark Kimberling_