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.

A157810 Period 4: repeat [2, 1, 3, 2].

This page as a plain text file.
%I A157810 #31 Dec 12 2023 08:08:10
%S A157810 2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,
%T A157810 3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,
%U A157810 2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2,2,1,3,2
%N A157810 Period 4: repeat [2, 1, 3, 2].
%C A157810 Continued fraction expansion of (7+sqrt(93))/6. - _Klaus Brockhaus_, Apr 30 2010
%H A157810 Vesselin Dimitrov, <a href="http://www.thehcmr.org/issue1_2/problems_and_solutions.pdf">Problem S07 - 4 (Corrected).</a> Harvard College Mathematical Review, Vol. 1, No. 2, Fall 2007.
%H A157810 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1).
%F A157810 a(n) = a(n-4) for n>4. G.f.: x*(2*x^3+3*x^2+x+2) / ((1-x)*(x+1)*(x^2+1)). - _Colin Barker_, Jun 20 2014
%F A157810 a(n) = 2-(-1)^n/2+(-1)^ceiling(n/2)/2. - _Wesley Ivan Hurt_, Jun 23 2014
%F A157810 a(n) = (4 + cos(n*Pi/2) - cos(n*Pi) - sin(n*Pi/2) - I*sin(n*Pi))/2.
%p A157810 A157810:=n->2 - (-1)^n/2 + (-1)^ceil(n/2)/2; seq(A157810(n), n=1..100); # _Wesley Ivan Hurt_, Jun 23 2014
%t A157810 ContinuedFraction[(7+Sqrt[93])/6,100] (* _Harvey P. Dale_, Jun 28 2012 *)
%t A157810 CoefficientList[Series[-(2*x^3 + 3*x^2 + x + 2)/((x - 1)*(x + 1)*(x^2 + 1)), {x, 0, 60}], x] (* _Wesley Ivan Hurt_, Jun 22 2014 *)
%o A157810 (PARI) Vec(-x*(2*x^3+3*x^2+x+2)/((x-1)*(x+1)*(x^2+1)) + O(x^100)) \\ _Colin Barker_, Jun 20 2014
%o A157810 (Magma) [2 - (-1)^n/2 + (-1)^Ceiling(n/2)/2 : n in [1..100]]; // _Wesley Ivan Hurt_, Jun 23 2014
%Y A157810 Cf. A001220.
%K A157810 nonn,easy
%O A157810 1,1
%A A157810 _Jonathan Vos Post_, Mar 07 2009
%E A157810 Simpler definition from _Wesley Ivan Hurt_, Jul 07 2014