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!)
A281727 a(n) = (-1)^n * 2 if n = 3*k and n!=0, otherwise a(n) = (-1)^n. 0
1, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
Euler transform of length 6 sequence [-1, 1, -1, -1, 0, 1].
a(n) = -b(n) where b() is multiplicative with b(2^e) = -1 if e>0, b(3^e) = 2 if e>0, b(p^e) = 1 otherwise.
G.f.: 1 - x / (1 + x) - x^3 / (1 + x^3).
G.f.: (1 - x + x^2 - x^3) / (1 + x^3).
G.f.: (1 - x) * (1 - x^3) * (1 - x^4) / ((1 - x^2) * (1 - x^6)).
a(n) = a(-n) for all n in Z.
a(3*n) = A280560(n) for all n in Z.
EXAMPLE
G.f. = 1 - x + x^2 - 2*x^3 + x^4 - x^5 + 2*x^6 - x^7 + x^8 - 2*x^9 + ...
MATHEMATICA
a[ n_] := {2, -1, 1, -2, 1, -1}[[Mod[n, 6] + 1]] - Boole[n == 0];
a[ n_] := (-1)^n If[ n != 0 && Divisible[n, 3], 2, 1];
a[ n_] := SeriesCoefficient[ (1 - x + x^2 - x^3) / (1 + x^3), {x, 0, Abs[n]}];
PROG
(PARI) {a(n) = (-1)^n * if(n && n%3==0, 2, 1)};
(PARI) {a(n) = [2, -1, 1, -2, 1, -1][n%6 + 1] - (n==0)};
(PARI) {a(n) = n=abs(n); polcoeff( (1 - x + x^2 - x^3) / (1 + x^3) + x * O(x^n), n)};
CROSSREFS
Cf. A280560.
Sequence in context: A016010 A099837 A100051 * A122876 A131713 A100063
KEYWORD
sign
AUTHOR
Michael Somos, Jan 28 2017
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 17 20:17 EDT 2024. Contains 371767 sequences. (Running on oeis4.)