|
|
A258998
|
|
a(n) = -(-1)^n if n = k^2 for positive integer k, otherwise 0.
|
|
3
|
|
|
0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0
|
|
COMMENTS
|
Denoted by B_n^o(-1) in Kassel and Reutenauer 2105.
|
|
LINKS
|
|
|
FORMULA
|
Expansion of (1 - phi(-x)) / 2 in powers of x where phi() is a Ramanujan theta function.
a(n) is multiplicative with a(2^e) = (-1)^(e/2) if e even, a(p^e) = 1 if p>2 and e even, otherwise 0.
G.f.: (1 - theta_4(x)) / 2 where theta_4() is a Jacobi theta function.
-2 * a(n) = A002448(n) unless n = 0. a(n) = -(-1)^n * A010052(n) unless n = 0.
a(n) = ((-1)^(n+2^(n-(floor(sqrt(n)))^2))-(-1)^(n+2^n))/2. - Luce ETIENNE, Aug 31 2015
Dirichlet g.f.: zeta(2*s)*(4^s-1)/(4^s+1). - Amiram Eldar, Dec 29 2022
|
|
EXAMPLE
|
G.f. = x - x^4 + x^9 - x^16 + x^25 - x^36 + x^49 - x^64 + x^81 - x^100 + ...
|
|
MATHEMATICA
|
a[ n_] := If[ n < 1, 0, If[ IntegerQ[ Sqrt @ n], -(-1)^n, 0]];
a[ n_] := SeriesCoefficient[ (1 - EllipticTheta[ 4, 0, x]) / 2, {x, 0, n}];
|
|
PROG
|
(PARI) {a(n) = if( n<1, 0, issquare(n), -(-1)^n, 0)};
(Magma) [((-1)^(n+2^(n-(Floor(Sqrt(n)))^2))-(-1)^(n+2^n))/2: n in [0..100]]; // Vincenzo Librandi, Sep 03 2015
|
|
CROSSREFS
|
Cf. Related to Expansion of (1 - eta(q)^k / eta(q^k)) / k in powers of q: this sequence (k=2), A123477 (k=3), A109091 (k=5), A160535 (k=7).
|
|
KEYWORD
|
sign,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|