login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Antti Karttunen, Table of n, a(n) for n = 0..65537

M. Somos, Rational Function Multiplicative Coefficients

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

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.

a(n) = 1 + 1/8*[n mod 8 + (n+3) mod 8 - (n+4) mod 8 - (n+7) mod 8]. [Paolo P. Lava, Jun 24 2015]

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

Cf. A010877, A257179.

Sequence in context: A326695 A323191 A257179 * A333179 A240021 A087810

Adjacent sequences:  A259039 A259040 A259041 * A259043 A259044 A259045

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 9 19:36 EDT 2020. Contains 333362 sequences. (Running on oeis4.)