The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A157810 Period 4: repeat [2, 1, 3, 2]. 4
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, 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, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Continued fraction expansion of (7+sqrt(93))/6. - Klaus Brockhaus, Apr 30 2010
LINKS
Vesselin Dimitrov, Problem S07 - 4 (Corrected). Harvard College Mathematical Review, Vol. 1, No. 2, Fall 2007.
FORMULA
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
a(n) = 2-(-1)^n/2+(-1)^ceiling(n/2)/2. - Wesley Ivan Hurt, Jun 23 2014
a(n) = (4 + cos(n*Pi/2) - cos(n*Pi) - sin(n*Pi/2) - I*sin(n*Pi))/2.
MAPLE
A157810:=n->2 - (-1)^n/2 + (-1)^ceil(n/2)/2; seq(A157810(n), n=1..100); # Wesley Ivan Hurt, Jun 23 2014
MATHEMATICA
ContinuedFraction[(7+Sqrt[93])/6, 100] (* Harvey P. Dale, Jun 28 2012 *)
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 *)
PROG
(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
(Magma) [2 - (-1)^n/2 + (-1)^Ceiling(n/2)/2 : n in [1..100]]; // Wesley Ivan Hurt, Jun 23 2014
CROSSREFS
Cf. A001220.
Sequence in context: A324923 A126303 A306467 * A072339 A342507 A261337
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Mar 07 2009
EXTENSIONS
Simpler definition from Wesley Ivan Hurt, Jul 07 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 07:58 EDT 2024. Contains 372538 sequences. (Running on oeis4.)