login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257075 a(n) = (-1)^(n mod 3). 6
1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Period 3: repeat [1, -1, 1]. - Wesley Ivan Hurt, Jul 02 2016

LINKS

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

M. Somos, Rational Function Multiplicative Coefficients

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

FORMULA

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

a(n) = b(2*n + 1) where b() is multiplicative with b(2^e) = 0^e, b(3^e) = -1 if e>0, otherwise b(p^e) = 1.

a(n) = a(-1-n) = a(n+3) = -a(n-1)*a(n-2) for all n in Z.

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

G.f.: (1 - x) * (1 - x^6) / ((1 - x^2) * (1 - x^3)^2).

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

Given g.f. A(x), then x*A(x^2) = Sum_{k>0} (x^k - x^(2*k)) - 2*(x^(3*k) - x^(6*k)).

a(n) = A131561(n+1) for all n in Z.

a(n) = (-1)^n * A130151(n) for all n in Z.

Convolution inverse is A257076.

PSUM transform is A008611.

BINOMIAL transform is A086953.

1 / (1 - a(0)*x / (1 - a(1)*x / (1 - a(2)*x / ...))) is the g.f. of A168505.

From Wesley Ivan Hurt, Jul 02 2016: (Start)

a(n) = (1 + 2*cos(2*n*Pi/3) - 2*sqrt(3)*sin(2*n*Pi/3))/3.

a(n) = 2*sgn((n+2) mod 3) - 1. (End)

E.g.f.: (exp(3*x/2) + 4*sin(Pi/6-sqrt(3)*x/2))*exp(-x/2)/3. - Ilya Gutkovskiy, Jul 02 2016

EXAMPLE

G.f. = 1 - x + x^2 + x^3 - x^4 + x^5 + x^6 - x^7 + x^8 + x^9 - x^10 + ...

G.f. = q - q^3 + q^5 + q^7 - q^9 + q^11 + q^13 - q^15 + q^17 + q^19 + ...

MAPLE

A257075:=n->(-1)^(n mod 3): seq(A257075(n), n=0..100); # Wesley Ivan Hurt, Jul 02 2016

MATHEMATICA

a[ n_] := (-1)^Mod[n, 3]; Table[a[n], {n, 0, 100}]

PROG

(PARI) {a(n) = (-1)^(n%3)};

(PARI) {a(n) = 1 - 2 * (n%3 == 1)};

(PARI) {a(n) = [1, -1, 1][n%3 + 1]};

(PARI) {a(n) = my(A, p, e); n = abs(2*n + 1); A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, 0, p==3, -1, 1))};

(MAGMA) [(-1)^(n mod 3) : n in [0..100]]; // Wesley Ivan Hurt, Jul 02 2016

CROSSREFS

Cf. A008611, A086953, A130151, A131561, A168505, A257076.

Sequence in context: A269529 A156734 A119664 * A010555 A108784 A244513

Adjacent sequences:  A257072 A257073 A257074 * A257076 A257077 A257078

KEYWORD

sign,easy

AUTHOR

Michael Somos, Apr 15 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 23 16:14 EDT 2019. Contains 325258 sequences. (Running on oeis4.)