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!)
A164115 Expansion of (1 - x^5) / ((1 - x) * (1 - x^4)) in powers of x. 3
1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
The sequence A107453 has the same terms but different offset.
Convolution inverse of A164116.
Decimal expansion of 11111/99990. - Elmo R. Oliveira, Feb 18 2024
LINKS
FORMULA
Euler transform of length-5 sequence [ 1, 0, 0, 1, -1].
a(n) is multiplicative with a(2) = 1, a(2^e) = 2 if e>1, a(p^e) = 1 if p>2.
a(n) = (-1)^n * A164117(n).
a(4*n) = 2 unless n=0. a(2*n + 1) = a(4*n + 2) = 1.
a(-n) = a(n). a(n+4) = a(n) unless n=0 or n=-4.
G.f.: (1 + x + x^2 + x^3 + x^4) / ((1+x)*(1-x)*(1+x^2)).
a(n) = A138191(n+2), n>0. - R. J. Mathar, Aug 17 2009
Dirichlet g.f. (1+1/4^s)*zeta(s). - R. J. Mathar, Feb 24 2011
a(n) = (i^n + (-i)^n + (-1)^n + 5)/4 for n > 0 where i is the imaginary unit. - Bruno Berselli, Feb 25 2011
EXAMPLE
1 + x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + x^7 + 2*x^8 + x^9 + x^10 + ...
MATHEMATICA
CoefficientList[Series[(1+x+x^2+x^3+x^4)/(1-x^4), {x, 0, 100}], x] (* G. C. Greubel, Sep 22 2018 *)
LinearRecurrence[{0, 0, 0, 1}, {1, 1, 1, 1, 2}, 120] (* or *) PadRight[{1}, 120, {2, 1, 1, 1}] (* Harvey P. Dale, Aug 24 2019 *)
PROG
(PARI) {a(n) = 2 - (n==0) - (n%4>0)}
(PARI) x='x+O('x^99); Vec((1-x^5)/((1-x)*(1-x^4))) \\ Altug Alkan, Sep 23 2018
(Magma) m:=100; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+x+x^2+x^3+x^4)/(1-x^4))); // G. C. Greubel, Sep 22 2018
CROSSREFS
Sequence in context: A186006 A236398 A107453 * A164117 A177704 A138191
KEYWORD
nonn,mult,easy
AUTHOR
Michael Somos, Aug 10 2009
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 June 10 03:52 EDT 2024. Contains 373253 sequences. (Running on oeis4.)