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

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A259829 a(n) = (-1)^floor(n/2) * A035185(n). 2
1, -1, 0, 1, 0, 0, -2, 1, 1, 0, 0, 0, 0, -2, 0, 1, 2, -1, 0, 0, 0, 0, -2, 0, 1, 0, 0, 2, 0, 0, -2, 1, 0, -2, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, -2, -2, 0, 3, -1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, -2, -2, 1, 0, 0, 0, 2, 0, 0, -2, 1, 2, 0, 0, 0, 0, 0, -2, 0, 1, -2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..10000

FORMULA

G.f.: Sum_{n >= 1} -(-1)^n * q^(n*(n+1)/2)*(1-q)*(1-q^2)*...*(1-q^(n-1))/ ((1+q)*(1+q^2)*...*(1+q^n)). - Jeremy Lovejoy, Jun 12 2009

a(4*n) = A035185(n). a(8*n + 3) = a(8*n + 5) = 0.

EXAMPLE

G.f. = x - x^2 + x^4 - 2*x^7 + x^8 + x^9 - 2*x^14 + x^16 + 2*x^17 - x^18 + ...

MATHEMATICA

a[ n_] := If[ n < 1, 0, (-1)^Quotient[n, 2] DivisorSum[ n, KroneckerSymbol[ 2, #]&]];

a[ n_] := If[ n < 1, 0, I^(1 - n) Times @@ ( Which[ # == 1, 1, # == 2, -I, Mod[#, 8] > 1 && Mod[#, 8] < 7, 1 - Mod[#2, 2], True, #2 + 1] & @@@ FactorInteger @ n)];

PROG

(PARI) {a(n) = if( n<1, 0, (-1)^(n\2) * sumdiv( n, d, kronecker( 2, d)))};

(PARI) {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); I^(1-n) * prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if(p==2, -I, p%8>1 && p%8<7, !(e%2), e+1)))};

CROSSREFS

Cf. A035185.

Sequence in context: A025923 A138158 A057276 * A035185 A244600 A288558

Adjacent sequences:  A259826 A259827 A259828 * A259830 A259831 A259832

KEYWORD

sign

AUTHOR

Michael Somos, Jul 06 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 December 10 04:15 EST 2019. Contains 329885 sequences. (Running on oeis4.)