OFFSET
0,1
LINKS
Michael Somos, Rational Function Multiplicative Coefficients
Index entries for linear recurrences with constant coefficients, signature (0,0,-1).
FORMULA
a(n+6) = a(n), a(0)=a(1)=a(2)=-a(3)=-a(4)=-a(5)=1.
a(n) = ((-1)^n * (4 * (cos((2*n + 1)*Pi/3) + cos(n*Pi)) + 1) - 4) / 3. - Federico Acha Neckar (f0383864(AT)hotmail.com), Sep 01 2007
a(n) = (-1)^n * (4 * cos((2*n + 1) * Pi/3) + 1) / 3. - Federico Acha Neckar (f0383864(AT)hotmail.com), Sep 02 2007
G.f.: (1+x+x^2)/((1+x)*(x^2-x+1)). - R. J. Mathar, Nov 14 2007
a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4) for n>3. - Paul Curtz, Nov 22 2007
a(n) = (-1)^floor(n/3). Compare with A057077, A143621 and A143622. Define E(k) = Sum_{n >= 0} a(n)*n^k/n! for k = 0,1,2,... . Then E(k) is an integral linear combination of E(0), E(1) and E(2) (a Dobinski-type relation). Precisely, E(k) = A143628(k)*E(0) + A143629(k)*E(1) + A143630(k)*E(2). - Peter Bala, Aug 28 2008
Euler transform of length 6 sequence [1, 0, -2, 0, 0, 1]. - Michael Somos, Feb 26 2011
a(n) = b(2*n + 1) where b(n) is multiplicative with b(2^e) = 0^e, b(3^e) = -(-1)^e if e>0, b(p^e) = 1 if p == 1 (mod 4), b(p^e) = (-1)^e if p == 3 (mod 4) and p>3. - Michael Somos, Feb 26 2011
a(n + 3) = a(-1 - n) = -a(n) for all n in Z. - Michael Somos, Feb 26 2011
a(n) = (-1)^n * A257075(n) for all n in Z. - Michael Somos, Apr 15 2015
G.f.: 1 / (1 - x / (1 + 2*x^2 / (1 + x / (1 + x / (1 - x))))). - Michael Somos, Apr 15 2015
From Wesley Ivan Hurt, Jul 05 2016: (Start)
a(n) + a(n-3) = 0 for n>2.
a(n) = (cos(n*Pi) + 2*cos(n*Pi/3) + 2*sqrt(3)*sin(n*Pi/3)) / 3. (End)
a(n)*a(n-4) = a(n-1)*a(n-3) for all n in Z. - Michael Somos, Feb 25 2020
EXAMPLE
G.f. = 1 + x + x^2 - x^3 - x^4 - x^5 + x^6 + x^7 + x^8 - x^9 - x^10 - x^11 + ...
G.f. = q + q^3 + q^5 - q^7 - q^9 - q^11 + q^13 + q^15 + q^17 - q^19 - q^21 + ...
MAPLE
seq(op([1, 1, 1, -1, -1, -1]), n=0..30); # Wesley Ivan Hurt, Jul 05 2016
MATHEMATICA
a[ n_] := (-1)^Quotient[n, 3]; (* Michael Somos, Apr 24 2014 *)
PadRight[{}, 100, {1, 1, 1, -1, -1, -1}] (* Wesley Ivan Hurt, Jul 05 2016 *)
PROG
(PARI) {a(n) = (-1) ^ (n\3)}; /* Michael Somos, Feb 26 2011 */
(Magma) &cat [[1, 1, 1, -1, -1, -1]^^20]; // Wesley Ivan Hurt, Jul 05 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Aug 03 2007
STATUS
approved