login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228441 G.f.: Sum_{k>0} -(-x)^k / (1 + x^k). 3
1, -2, 2, -1, 2, -4, 2, 0, 3, -4, 2, -2, 2, -4, 4, 1, 2, -6, 2, -2, 4, -4, 2, 0, 3, -4, 4, -2, 2, -8, 2, 2, 4, -4, 4, -3, 2, -4, 4, 0, 2, -8, 2, -2, 6, -4, 2, 2, 3, -6, 4, -2, 2, -8, 4, 0, 4, -4, 2, -4, 2, -4, 6, 3, 4, -8, 2, -2, 4, -8, 2, 0, 2, -4, 6, -2, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

P. Bala, A signed Dirichlet product of arithmetical functions

J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4 and p. 8).

Index entries for sequences mentioned by Glaisher

FORMULA

a(n) = number of divisors of n minus 4 times number of divisors of n of the form 4*k+2.

a(n) = Sum_{d|n} (-1)^(d+n/d). - N. J. A. Sloane, Nov 23 2018

Multiplicative with a(2^e) = e-3 if e>0, a(p^e) = e+1 if p>2.

Moebius transform is period 4 sequence [1, -3, 1, 1, ...].

G.f.: Sum_{k>0} x^k / (1 - x^k) - 4 * x^(4*k + 2) / (1 - x^(4*k + 2)).

a(2*n - 1) = A099774(n).

Dirichlet g.f.: zeta(s)^2*(1-2^(-s+1))^2 = eta^2(s) (the Dirichlet eta). - Ralf Stephan, Mar 27 2015

a(16n+8) = a(A051062(n)) = 0. - Michel Marcus, Mar 27 2015

O.g.f.: Sum_{n >= 1} (-1)^(n*(n+1))*x^(n^2)*(1 - x^n)/(1 + x^n). - Peter Bala, Mar 11 2019

Conjecture: a(n) = (7 - 2*(-1)^n)*tau(n) - 4*tau(2*n) = 5*tau(n) - (3 + (-1)^n)*tau(2*n), where tau = A000005. - Velin Yanev, Dec 17 2019

EXAMPLE

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

MATHEMATICA

a[ n_] := SeriesCoefficient[ Sum[ -(-x)^k / (1 + x^k), {k, 1, n}], {x, 0, n}];

a[ n_] := If[ n < 1, 0, DivisorSum[ n, (-1)^(# + n/#) &]]; (* Michael Somos, Jan 08 2015 *)

PROG

(PARI) {a(n) = if( n<1, 0, sumdiv(n, k, (-1)^(k + n/k)))};

(PARI) {a(n) = if( n<1, 0, numdiv(n) - 4 * sumdiv( n, k, k%4 == 2))};

(PARI) {a(n) = my(e); if( n<1, 0, e = valuation( n, 2); numdiv( n/2^e) * if( e>0, e-3, 1))};

(PARI) a(n)=direuler(p=1, n, if(p==2, (1-2*X)^2/(1-X)^2, 1/(1-X)^2))[n] /* Ralf Stephan, Mar 27 2015 */

CROSSREFS

Cf. A016825, A099774, A046897, A321558.

Sequence in context: A007427 A048106 A304649 * A156260 A056671 A278763

Adjacent sequences:  A228438 A228439 A228440 * A228442 A228443 A228444

KEYWORD

sign,mult

AUTHOR

Michael Somos, Nov 02 2013

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 13 13:48 EDT 2020. Contains 335688 sequences. (Running on oeis4.)