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!)
A253262 Expansion of (x + x^2 + x^3) / (1 - x + x^2 - x^3 + x^4) in powers of x. 2
0, 1, 2, 2, 1, 0, -1, -2, -2, -1, 0, 1, 2, 2, 1, 0, -1, -2, -2, -1, 0, 1, 2, 2, 1, 0, -1, -2, -2, -1, 0, 1, 2, 2, 1, 0, -1, -2, -2, -1, 0, 1, 2, 2, 1, 0, -1, -2, -2, -1, 0, 1, 2, 2, 1, 0, -1, -2, -2, -1, 0, 1, 2, 2, 1, 0, -1, -2, -2, -1, 0, 1, 2, 2, 1, 0, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Cycle period is 10. - Robert G. Wilson v, Aug 02 2018

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..2500

Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1).

FORMULA

Euler transform of length 10 sequence [2, -1, -1, 0, -1, 0, 0, 0, 0, 1].

G.f.: x * (1 + x) * (1 - x^3) / ((1 - x) * (1 + x^5)).

INVERT transform is A003476.

a(n) = -a(-n) = -a(n+5) for all n in Z.

a(n) = f(n) / f(1) where f(n) := tan( am( n*x, m)) where x = 0.7379409146... and m = 1.3481185591... and am() is the Jacobi amplitude function.

EXAMPLE

G.f. = x + 2*x^2 + 2*x^3 + x^4 - x^6 - 2*x^7 - 2*x^8 - x^9 + x^11 + 2*x^12 + ...

MATHEMATICA

a[ n_] := {1, 2, 2, 1, 0}[[Mod[n, 5, 1]]] (-1)^Quotient[n, 5];

CoefficientList[Series[x*(1+x)*(1-x^3)/((1-x)*(1+x^5)), {x, 0, 60}], x] (* G. C. Greubel, Aug 02 2018 *)

CoefficientList[ Series[x (x^2 + x + 1)/(x^4 - x^3 + x^2 - x + 1), {x, 0, 75}], x] (* or *)

LinearRecurrence[{1, -1, 1, -1}, {0, 1, 2, 2}, 75] (* Robert G. Wilson v, Aug 02 2018 *)

PROG

(PARI) {a(n) = [0, 1, 2, 2, 1][n%5 + 1] * (-1)^(n\5)};

(PARI) x='x+O('x^60); concat([0], Vec(x*(1+x)*(1-x^3)/((1-x)*(1+x^5)))) \\ G. C. Greubel, Aug 02 2018

(Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(1+x)*(1-x^3)/((1-x)*(1+x^5)))); // G. C. Greubel, Aug 02 2018

CROSSREFS

Cf. A003476.

Sequence in context: A079693 A117444 A257145 * A015504 A055892 A293772

Adjacent sequences:  A253259 A253260 A253261 * A253263 A253264 A253265

KEYWORD

sign,easy

AUTHOR

Michael Somos, Apr 30 2015

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 October 6 12:35 EDT 2022. Contains 357264 sequences. (Running on oeis4.)