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!)
A259042 Period 8 sequence [0, 1, 1, 1, 2, 1, 1, 1, ...]. 2
0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
Euler transform of length 8 sequence [1, 0, 1, -1, 0, -1, 0, 1].
Moebius transform is length 8 sequence [1, 0, 0, 1, 0, 0, 0, -2].
a(n) is multiplicative with a(2) = 1, a(4) = 2, a(2^e) = 0 if e > 2, a(p^e) = 1 if p > 2.
G.f.: x * (1 + x^3)/((1-x)*(1 + x^4)).
G.f.: x * (1 - x^4)*(1 - x^6)/((1-x)*(1 - x^3)*(1 - x^8)).
G.f.: 1/(1-x) - 1/(1 + x^4).
a(n) = a(-n) = a(n+8) for all n in Z.
a(2*n + 1) = a(4*n + 2) = 1. a(8*n) = 0. a(8*n + 4) = 2.
a(n) = A257179(n+4) unless n = -4.
Dirichlet g.f.: zeta(s) * (1 + 4^(-s) - 2 * 8^(-s)). - Álvar Ibeas, Mar 18 2021
EXAMPLE
G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + x^7 + x^9 + x^10 + x^11 + ...
MATHEMATICA
a[ n_] := {1, 1, 1, 2, 1, 1, 1, 0}[[Mod[n, 8, 1]]];
a[ n_] := SeriesCoefficient[ 1 / (1 - x) - 1 / (1 + x^4), {x, 0, Abs@n}];
PROG
(PARI) {a(n) = 1 + (n%4 == 0) - 2*(n%8 == 0)};
(PARI) {a(n) = [ 0, 1, 1, 1, 2, 1, 1, 1][n%8 + 1]};
(PARI) {a(n) = polcoeff( 1 / (1 - x) - 1 / (1 + x^4) + x * O(x^abs(n)), abs(n))};
CROSSREFS
Sequence in context: A343749 A323191 A257179 * A350074 A333179 A240021
KEYWORD
nonn,mult,easy
AUTHOR
Michael Somos, Jun 17 2015
EXTENSIONS
More terms from Antti Karttunen, Jul 29 2018
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 April 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)