OFFSET
0,1
FORMULA
a(n) = -7 * b(n) where b(n) is multiplicative and b(7^e) = 1, ((p^2)^(e+1) - 1) / (p^2 - 1) if p == 1, 2, 4 (mod 7), (-(-p^2)^(e+1) + 1) / (p^2 + 1) if p == 3, 5, 6 (mod 7).
G.f. is a period 1 Fourier series which satisfies f(-1 / (7 t)) = 7^(7/2) (t/i)^3 g(t) where q = exp(2 Pi i t) and g() is g.f. for A105634.
EXAMPLE
8 - 7*q - 35*q^2 + 56*q^3 - 147*q^4 + 168*q^5 + 280*q^6 - 7*q^7 - 595*q^8 + ...
PROG
(PARI) {a(n) = if( n<1, 8 * (n==0), -7 * sumdiv(n, d, d^2 * kronecker(-7, d)))}
(PARI) {a(n) = local(A, p, e); if( n<1, 8 * (n==0), A = factor(n); -7 * prod( k=1, matsize(A)[1], if( p = A[k, 1], e = A[k, 2]; if( p==7, 1, if(kronecker(p, 7)==1, ((p^2)^(e+1) - 1) / (p^2 - 1), (-(-p^2)^(e+1) + 1) / (p^2 + 1)))))) }
(PARI) {a(n) = local(A, B); if( n<0, 0, A = x * O(x^n); polcoeff( if(B = eta(x^7 + A), A = eta(x + A); 49 * x * (A * B)^3 + 8 * A^7 / B), n))}
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Mar 31 2008
STATUS
approved