cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-30 of 99 results. Next

A168243 Expansion of e.g.f. Product_{i>=1} (1 + x^i)^(1/i).

Original entry on oeis.org

1, 1, 1, 5, 11, 59, 439, 2659, 13705, 160649, 2009681, 16966421, 183312931, 2078169235, 34203787591, 657685416179, 8054585463569, 104530824746129, 2595754682459425, 39767021562661669, 758079429084897211
Offset: 0

Views

Author

Vladeta Jovovic, Nov 21 2009

Keywords

Crossrefs

Cf. A028342.

Programs

  • Mathematica
    nmax=20; CoefficientList[Series[Product[(1+x^k)^(1/k),{k,1,nmax}],{x,0,nmax}],x] * Range[0,nmax]! (* Vaclav Kotesovec, May 28 2015 *)
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[-(-1)^d, {d, Divisors[k]}]*a[n-k], {k, 1, n}]/n]; Table[n!*a[n], {n, 0, 20}] (* Vaclav Kotesovec, Sep 07 2018 *)

Formula

E.g.f.: exp(Sum_{n>=1} A048272(n)*x^n/n).
Conjecture: log(a(n)/n!) ~ (log(2) - 1) * log(n). - Vaclav Kotesovec, Sep 10 2018

A059358 Coefficients in expansion of Sum_{n >= 1} x^n/(1-x^n)^4.

Original entry on oeis.org

0, 1, 5, 11, 25, 36, 71, 85, 145, 176, 260, 287, 455, 456, 649, 726, 961, 970, 1376, 1331, 1820, 1866, 2315, 2301, 3175, 2961, 3736, 3830, 4729, 4496, 5966, 5457, 6945, 6842, 8114, 7890, 10196, 9140, 11215, 11126, 13420, 12342, 15730, 14191, 17515, 17106, 19601
Offset: 0

Views

Author

N. J. A. Sloane, Jan 27 2001

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          add(d*(d+1)*(d+2)/6, d=numtheory[divisors](n))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Jun 12 2023
  • Mathematica
    With[{nn=50},CoefficientList[Series[Sum[x^n/(1-x^n)^4,{n,nn}],{x,0,nn}],x]] (* Harvey P. Dale, May 14 2013 *)
  • PARI
    a(n) = if(n==0, 0, sumdiv(n, d, binomial(d+2, 3))); \\ Seiichi Manyama, Apr 19 2021
    
  • PARI
    a(n) = if(n==0, 0, my(f = factor(n)); (sigma(f, 3) + 3*sigma(f, 2) + 2 * sigma(f)) / 6); \\ Amiram Eldar, Dec 29 2024

Formula

a(n) = (1/6)*(sigma_3(n) + 3*sigma_2(n) + 2*sigma_1(n)), i.e., this sequence is the inverse Möbius transform of tetrahedral (or pyramidal) numbers: n*(n+1)(n+2)/6 with g.f. 1/(1-x)^4 (cf. A000292). - Vladeta Jovovic, Aug 31 2002
L.g.f.: -log(Product_{k>=1} (1 - x^k)^((k+1)*(k+2)/6)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 21 2018
From Amiram Eldar, Dec 29 2024: (Start)
Dirichlet g.f.: zeta(s) * (zeta(s-3) + 3*zeta(s-2) + 2*zeta(s-1)) / 6.
Sum_{k=1..n} a(k) ~ (zeta(4)/24) * n^4. (End)

A078306 a(n) = Sum_{d divides n} (-1)^(n/d+1)*d^2.

Original entry on oeis.org

1, 3, 10, 11, 26, 30, 50, 43, 91, 78, 122, 110, 170, 150, 260, 171, 290, 273, 362, 286, 500, 366, 530, 430, 651, 510, 820, 550, 842, 780, 962, 683, 1220, 870, 1300, 1001, 1370, 1086, 1700, 1118, 1682, 1500, 1850, 1342, 2366, 1590, 2210, 1710, 2451, 1953
Offset: 1

Views

Author

Vladeta Jovovic, Nov 22 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(-1)^(n/d+1)*d^2, {d, Divisors[n]}]; Array[a, 50] (* Jean-François Alcover, Apr 17 2014 *)
    Table[CoefficientList[Series[-Log[Product[1/(x^k + 1)^k, {k, 1, 90}]], {x, 0, 80}], x][[n + 1]] n, {n, 1, 80}] (* Benedict W. J. Irwin, Jul 05 2016 *)
  • PARI
    a(n) = sumdiv(n, d, (-1)^(n/d+1)*d^2); \\ Michel Marcus, Jul 06 2016
    
  • Python
    from sympy import divisors
    print([sum((-1)**(n//d + 1)*d**2 for d in divisors(n)) for n in range(1, 51)]) # Indranil Ghosh, Apr 05 2017

Formula

G.f.: Sum_{n >= 1} n^2*x^n/(1+x^n).
Multiplicative with a(2^e) = (2*4^e+1)/3, a(p^e) = (p^(2*e+2)-1)/(p^2-1), p > 2.
L.g.f.: -log(Product_{ k>0 } 1/(x^k+1)^k) = Sum_{ n>0 } (a(n)/n)*x^n. - Benedict W. J. Irwin, Jul 05 2016
G.f.: Sum_{n >= 1} (-1)^(n+1) * x^n*(1 + x^n)/(1 - x^n)^3. - Peter Bala, Jan 14 2021
From Vaclav Kotesovec, Aug 07 2022: (Start)
Dirichlet g.f.: zeta(s) * zeta(s-2) * (1 - 2^(1-s)).
Sum_{k=1..n} a(k) ~ zeta(3) * n^3 / 4. (End)

A008457 a(n) = Sum_{ d >= 1, d divides n} (-1)^(n-d)*d^3.

Original entry on oeis.org

1, 7, 28, 71, 126, 196, 344, 583, 757, 882, 1332, 1988, 2198, 2408, 3528, 4679, 4914, 5299, 6860, 8946, 9632, 9324, 12168, 16324, 15751, 15386, 20440, 24424, 24390, 24696, 29792, 37447, 37296, 34398, 43344, 53747, 50654, 48020, 61544, 73458
Offset: 1

Views

Author

Keywords

Comments

The modular form (e(1)-e(2))(e(1)-e(3)) for GAMMA_0 (2) (with constant term -1/16 omitted).
a(n) = r_8(n)/16, where r_8(n) = A000143(n) is the number of integral solutions of Sum_{j=1..8} x_j^2 = n (with the order of the summands respected). See the Grosswald reference, and the Hardy reference, pp. 146-147, eq. (9.9.3) and sect. 9.10. - Wolfdieter Lang, Jan 09 2017

Examples

			G.f. = q + 7*q^2 + 28*q^3 + 71*q^4 + 126*q^5 + 196*q^6 + 344*q^7 + 583*q^8 + ...
		

References

  • Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 77, Eq. (31.6).
  • Emil Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 121, eq. (9.19).
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 142.
  • F. Hirzebruch, T. Berger and R. Jung, Manifolds and Modular Forms, Vieweg, 1994, pp. 77, 133.
  • Hans Petersson, Modulfunktionen und Quadratische Formen, Springer-Verlag, 1982; p. 179.

Crossrefs

Programs

  • Maple
    (1/16)*product((1+q^n)^8/(1-q^n)^8,n=1..60);
  • Mathematica
    nmax = 40; Rest[CoefficientList[Series[Product[((1-(-q)^k)/(1+(-q)^k))^8, {k, 1, nmax}]/16, {q, 0, nmax}], q]] (* Vaclav Kotesovec, Sep 26 2015 *)
    a[n_] := DivisorSum[n, (-1)^(n-#)*#^3&]; Array[a, 40] (* Jean-François Alcover, Dec 01 2015 *)
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, x]^8 - 1) / 16, {x, 0, n}]; (* Michael Somos, Aug 10 2018 *)
    f[2, e_] := (8^(e+1)-15)/7; f[p_, e_] := (p^(3*e+3)-1)/(p^3-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 21 2020 *)
  • PARI
    {a(n) = if( n<1, 0, (-1)^n * sumdiv(n, d, (-1)^d * d^3))}; /* Michael Somos, Sep 25 2005 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A008457(n): return prod((p**(3*(e+1))-(1 if p&1 else 15))//(p**3-1) for p, e in factorint(n).items()) # Chai Wah Wu, Jun 21 2024

Formula

Multiplicative with a(2^e) = (8^(e+1)-15)/7, a(p^e) = (p^(3*e+3)-1)/(p^3-1), p > 2. - Vladeta Jovovic, Sep 10 2001
a(n) = (-1)^n*(sum of cubes of even divisors of n - sum of cubes of odd divisors of n), see A051000. Sum_{n>0} n^3*x^n*(15*x^n-(-1)^n)/(1-x^(2*n)). - Vladeta Jovovic, Oct 24 2002
G.f.: Sum_{k>0} k^3 x^k/(1 - (-x)^k). - Michael Somos, Sep 25 2005
G.f.: (1/16)*(-1+(Product_{k>0} (1-(-q)^k)/(1+(-q)^k))^8). [corrected by Vaclav Kotesovec, Sep 26 2015]
Dirichlet g.f. zeta(s)*zeta(s-3)*(1-2^(1-s)+2^(4-2s)), Dirichlet convolution of A001158 and the quasi-finite (1,-2,0,16,0,0,...). - R. J. Mathar, Mar 04 2011
A138503(n) = -(-1)^n * a(n).
Bisection: a(2*k-1) = A001158(2*k-1), a(2*k) = 8*A001158(k) - A051000(k), k >= 1. In the Hardy reference a(n) = sigma^*3(n). - _Wolfdieter Lang, Jan 07 2017
G.f.: (theta_3(x)^8 - 1)/16, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 17 2018
Sum_{k=1..n} a(k) ~ Pi^4 * n^4 / 384. - Vaclav Kotesovec, Sep 21 2020

A112329 Number of divisors of n if n odd, number of divisors of n/4 if n divisible by 4, otherwise 0.

Original entry on oeis.org

1, 0, 2, 1, 2, 0, 2, 2, 3, 0, 2, 2, 2, 0, 4, 3, 2, 0, 2, 2, 4, 0, 2, 4, 3, 0, 4, 2, 2, 0, 2, 4, 4, 0, 4, 3, 2, 0, 4, 4, 2, 0, 2, 2, 6, 0, 2, 6, 3, 0, 4, 2, 2, 0, 4, 4, 4, 0, 2, 4, 2, 0, 6, 5, 4, 0, 2, 2, 4, 0, 2, 6, 2, 0, 6, 2, 4, 0, 2, 6, 5, 0, 2, 4, 4, 0, 4, 4, 2, 0, 4, 2, 4, 0, 4, 8, 2, 0, 6, 3, 2, 0, 2, 4, 8
Offset: 1

Views

Author

Michael Somos, Sep 04 2005

Keywords

Comments

First occurrence of k: 2, 1, 3, 9, 15, 64, 45, 256, 96, 144, 192, 4096, 240, ????, 768, 576, 480, ????, 720, ..., . See A246063. - Robert G. Wilson v, Oct 31 2013
a(n) is the number of pairs (u, v) in NxZ satisfying u^2-v^2=n. See Kühleitner. - Michel Marcus, Jul 30 2017
The g.f. in the form Sum_{k >= 1} x^(k^2) * (1 + x^(2*k))/(1 - x^(2*k)) = Sum_{k >= 1} x^(k^2) * (1 + x^(2*k))/(1 + x^(2*k) - 2*x^(2*k)) == Sum_{k >= 1} x^(k^2) (mod 2). It follows that a(n) is odd iff n = k^2 for some positive integer k. - Peter Bala, Jan 08 2025

Examples

			x + 2*x^3 + x^4 + 2*x^5 + 2*x^7 + 2*x^8 + 3*x^9 + 2*x^11 + 2*x^12 + ...
		

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 142.

Crossrefs

Programs

  • Maple
    f:= proc(n) if n::odd then numtheory:-tau(n) elif n mod 4 = 0 then numtheory:-tau(n/4) else 0 fi end proc;
    seq(f(i),i=1..100); # Robert Israel, Aug 24 2014
  • Mathematica
    Rest[ CoefficientList[ Series[ Sum[x^k/(1 - (-x)^k), {k, 111}], {x, 0, 110}], x]] (* Robert G. Wilson v, Sep 20 2005 *)
    Table[If[OddQ[n],DivisorSigma[0,n],If[OddQ[n/2],0,DivisorSigma[0,n/4]]],{n,100} ] (* Ray Chandler, Aug 23 2014 *)
  • PARI
    {a(n) = if( n<1, 0, (-1)^n * sumdiv( n, d, (-1)^d))}
    
  • PARI
    {a(n) = if( n<1, 0, if( n%2, numdiv(n), if( n%4, 0, numdiv(n/4))))} /* Michael Somos, Sep 02 2006 */
    
  • PARI
    d(n) = if (denominator(n)==1, numdiv(n), 0);
    a(n) = numdiv(n) - 2*d(n/2) + 2*d(n/4); \\ Michel Marcus, Jul 30 2017

Formula

Multiplicative with a(2^e) = e-1 if e>0, a(p^e) = 1+e if p>2.
G.f.: Sum_{k>0} x^k / (1 - (-x)^k) = Sum_{k>0} -(-x)^k / (1 + (-x)^k).
Möbius transform is period 4 sequence [ 1, -1, 1, 1, ...].
G.f.: Sum_{k>=1} x^(k^2) * (1+x^(2*k))/(1-x^(2*k)). - Joerg Arndt, Nov 08 2010
a(4*n + 2) = 0. a(n) = -(-1)^n * A048272(n). a(2*n - 1) = A099774(n). a(4*n) = A000005(n). a(4*n + 1) = A000005(4*n + 1). a(4*n - 1) = 2 * A078703(n).
a(n) = A094572(n) / 2. - Ray Chandler, Aug 23 2014
Bisection: a(2*k-1) = A000005(2*k-1), a(2*k) = A183063(2*k) - A001227(2*k), k >= 1. See the Hardy reference, p. 142 where a(n) = sigma^*0(n). - _Wolfdieter Lang, Jan 07 2017
a(n) = d(n) - 2*d(n/2) + 2*d(n/4) where d(n) = 0 if n is not an integer. See Kühleitner.
a(n) = Sum_{d|n} [(d mod 2) = (n/d mod 2)], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Mar 21 2022
From Amiram Eldar, Nov 29 2022: (Start)
Dirichlet g.f.: zeta(s)^2*(1 + 2^(1-2*s) - 2^(1-s)).
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (2*gamma-1)*n/2, where gamma is Euler's constant (A001620). (End)
a(n) = (-1)^n * Sum_{d|2*n} cos(d*Pi/2). - Ridouane Oudra, Sep 27 2024

A299480 List of pairs (a,b) where in the n-th pair, a = number of odd divisors of n and b = number of even divisors of n.

Original entry on oeis.org

1, 0, 1, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 1, 3, 3, 0, 2, 2, 2, 0, 2, 4, 2, 0, 2, 2, 4, 0, 1, 4, 2, 0, 3, 3, 2, 0, 2, 4, 4, 0, 2, 2, 2, 0, 2, 6, 3, 0, 2, 2, 4, 0, 2, 4, 2, 0, 4, 4, 2, 0, 1, 5, 4, 0, 2, 2, 4, 0, 3, 6, 2, 0, 2, 2, 4, 0, 2, 6, 2, 0, 4, 4, 2, 0, 2, 4, 6, 0, 2, 2, 2, 0, 2, 8, 3, 0, 3, 3, 4, 0, 2, 4
Offset: 1

Views

Author

Omar E. Pol, Feb 10 2018

Keywords

Comments

Also sequence found by reading in the upper part of the diagram of periodic curves for the number of divisors of n (see the first diagram in the Links section). Explanation: the number of curves that emerge from the point (n, 0) to the left hand in the upper part of the diagram equals A001227(n) the number of odd divisors of n. The number of curves that emerge from the same point (n, 0) to the right hand in the upper part of the diagram equals A183063(n) the number of even divisors of n. So the n-th pair is (A001227(n), A183063(n)). Also the total number of curves that emerges from the same point (n, 0) equals A000005(n), the number of divisors of n. Note that at the point (n, 0) the inflection point of the curve that emerges with diameter k represents the divisor n/k.
The second diagram in the links section shows only the upper part from the first diagram.

Examples

			Array begins:
n      A001227  A183063
1         1        0
2         1        1
3         2        0
4         1        2
5         2        0
6         2        2
7         2        0
8         1        3
9         3        0
10        2        2
11        2        0
12        2        4
...
		

Crossrefs

Row sums give A000005.
For another version see A299485.

Programs

  • Maple
    f := proc (n) local t; t := numtheory:-tau(n/2^padic:-ordp(n, 2)); t, numtheory:-tau(n)-t end proc:
    map(f, [$1..100]); # Robert Israel, Feb 11 2018
  • Mathematica
    m = 105; CoefficientList[Sum[(x^(2n-1) + x^(4n))/(1 - x^(4n)), {n, 1, m/2//Ceiling}] + O[x]^m, x] // Rest (* Jean-François Alcover, Mar 22 2019, after Robert Israel *)

Formula

Pair(a,b) = Pair(A001227(n), A183063(n)).
G.f.: Sum_{n>=1} (x^(2*n-1) + x^(4*n))/(1-x^(4*n)). - Robert Israel, Feb 11 2018

A138503 a(n) = Sum_{d|n} (-1)^(d-1)*d^3.

Original entry on oeis.org

1, -7, 28, -71, 126, -196, 344, -583, 757, -882, 1332, -1988, 2198, -2408, 3528, -4679, 4914, -5299, 6860, -8946, 9632, -9324, 12168, -16324, 15751, -15386, 20440, -24424, 24390, -24696, 29792, -37447, 37296, -34398, 43344, -53747, 50654, -48020, 61544, -73458
Offset: 1

Views

Author

Michael Somos, Mar 21 2008

Keywords

Comments

Also, expansion of (1 - phi(-q)^8) / 16 in powers of q where phi() is a Ramanujan theta function.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = q - 7*q^2 + 28*q^3 - 71*q^4 + 126*q^5 - 196*q^6 + 344*q^7 - 583*q^8 + ...
		

Crossrefs

Divisor sums Sum_{d|n} (-1)^(d-1)*d^k: A048272 (k = 0), A002129 (k = 1), A321543 (k = 2), A279395 (k = 4, unsigned), A321544 - A321551 (k = 5 to k = 12).

Programs

  • Maple
    with(numtheory):
    a := n -> add( (-1)^(d-1)*d^3, d in divisors(n) ): seq(a(n), n = 1..40);
    #  Peter Bala, Jan 11 2021
  • Mathematica
    a[ n_] := If[ n < 0, 0, DivisorSum[ n, -(-1)^# #^3&]]; (* Michael Somos, Sep 25 2015 *)
    a[ n_] := SeriesCoefficient[ (1 - EllipticTheta[ 4, 0, q]^8) / 16, {q, 0, n}]; (* Michael Somos, Sep 25 2015 *)
    nmax = 40; Rest[CoefficientList[Series[-Product[((1-q^k)/(1+q^k))^8, {k, 1, nmax}]/16, {q, 0, nmax}], q]] (* Vaclav Kotesovec, Sep 26 2015 *)
    f[p_, e_] := (p^(3*e + 3) - 1)/(p^3 - 1); f[2, e_] := 2 - (2^(3*e + 3) - 1)/7; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 40] (* Amiram Eldar, Nov 04 2022 *)
  • PARI
    {a(n) = if( n<0, 0, sumdiv(n, d, -(-1)^d * d^3))};

Formula

Expansion of (1 - (eta(q)^2 / eta(q^2))^8) / 16 in powers of q.
a(n) is multiplicative with a(2^e) = -(8^(e+1) - 15) / 7, a(p^e) = ((p^3)^(e+1) - 1) / (p^3 - 1).
G.f.: Sum_{k>0} k^3 * -(-x)^k / (1 - x^k).
a(n) = -(-1)^n * A008457(n). -16 * a(n) = A035016(n) unless n=0.
G.f.: Sum_{n >= 1} x^n*(1 - 4*x^n + x^(2*n))/(1 + x^n)^4. - Peter Bala, Jan 11 2021

Extensions

Simpler definition from N. J. A. Sloane, Nov 23 2018

A290971 Write x/(1-x) in the form Sum_{j>=1} a(j)*x^j/(1+a(j)*x^j).

Original entry on oeis.org

1, 2, 0, 6, 0, -6, 0, 54, 0, -30, 0, -114, 0, -126, 0, 4470, 0, -294, 0, -5850, 0, -2046, 0, -92418, 0, -8190, 0, -247674, 0, 2010, 0, 30229110, 0, -131070, 0, -8200914, 0, -524286, 0, -362617770, 0, 183162, 0, -354416634, 0, -8388606, 0, -53614489794, 0
Offset: 1

Views

Author

Gus Wiseman, Aug 16 2017

Keywords

Crossrefs

Programs

  • Mathematica
    nn=20;-Solve[Table[Sum[a[n/d]^d,{d,Divisors[n]}]==-1,{n,nn}],Array[a,nn]][[1,All,2]]

Formula

a(n) = -Sum_t (-1)^v(t) where the sum is over all same-trees of weight n (see A281145 for definition) and v(t) is the number of nodes (branchings and leaves) in t.

A299485 List of pairs (a,b) where in the n-th pair, a = number of even divisors of n and b = number of odd divisors of n.

Original entry on oeis.org

0, 1, 1, 1, 0, 2, 2, 1, 0, 2, 2, 2, 0, 2, 3, 1, 0, 3, 2, 2, 0, 2, 4, 2, 0, 2, 2, 2, 0, 4, 4, 1, 0, 2, 3, 3, 0, 2, 4, 2, 0, 4, 2, 2, 0, 2, 6, 2, 0, 3, 2, 2, 0, 4, 4, 2, 0, 2, 4, 4, 0, 2, 5, 1, 0, 4, 2, 2, 0, 4, 6, 3, 0, 2, 2, 2, 0, 4, 6, 2, 0, 2, 4, 4, 0, 2, 4, 2, 0, 6, 2, 2, 0, 2, 8, 2, 0, 3, 3, 3, 0, 4, 4, 2
Offset: 1

Views

Author

Omar E. Pol, Mar 03 2018

Keywords

Comments

Also sequence found by reading in the lower part of the diagram of periodic curves for the number of divisors of n (see the first diagram in the Links section). Explanation: the number of curves that emerge from the point (n, 0) to the left hand in the lower part of the diagram equals A183063(n) the number of even divisors of n. The number of curves that emerge from the same point (n, 0) to the right hand in the lower part of the diagram equals A001227(n) the number of odd divisors of n. So the n-th pair is (A183063(n), A001227(n)). Also the total number of curves that emerges from the same point (n, 0) equals A000005(n), the number of divisors of n. Note that at the point (n, 0) the inflection point of the curve that emerges with diameter k represents the divisor n/k.
The second diagram in the links section shows only the lower part from the first diagram, upside down.

Examples

			Array begins:
n      A183063  A001227
1         0        1
2         1        1
3         0        2
4         2        1
5         0        2
6         2        2
7         0        2
8         3        1
9         0        3
10        2        2
11        0        2
12        4        2
...
		

Crossrefs

Another version of A299480.
Row sums give A000005.

Programs

  • Mathematica
    Array[{#2, #1 - #2} & @@ {DivisorSigma[0, #], DivisorSum[#, 1 &, EvenQ]} &, 52] // Flatten (* Michael De Vlieger, Mar 04 2018 *)

Formula

Pair(a,b) = Pair(A183063(n), A001227(n)).

A325940 Expansion of Sum_{k>=1} x^(2*k) / (1 + x^k)^2.

Original entry on oeis.org

0, 1, -2, 4, -4, 4, -6, 11, -10, 6, -10, 18, -12, 8, -20, 26, -16, 13, -18, 28, -28, 12, -22, 48, -28, 14, -36, 38, -28, 24, -30, 57, -44, 18, -44, 62, -36, 20, -52, 74, -40, 32, -42, 58, -72, 24, -46, 110, -54, 31, -68, 68, -52, 40, -68, 100, -76, 30, -58, 116
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 09 2019

Keywords

Crossrefs

Programs

  • Magma
    A325940:= func< n | (&+[0^(n mod j)*(-1)^j*(j-1): j in [1..n]]) >;
    [A325940(n): n in [1..70]]; // G. C. Greubel, Jun 22 2024
    
  • Mathematica
    nmax = 60; CoefficientList[Series[Sum[x^(2 k)/(1 + x^k)^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[Sum[(-1)^d (d - 1), {d, Divisors[n]}], {n, 1, 60}]
  • PARI
    {a(n) = sumdiv(n, d, (-1)^d*(d-1))} \\ Seiichi Manyama, Sep 14 2019
    
  • SageMath
    def A325940(n): return sum(0^(n%j)*(-1)^j*(j-1) for j in range(1, n+1))
    [A325940(n) for n in range(1,71)] # G. C. Greubel, Jun 22 2024

Formula

G.f.: Sum_{k>=2} (-1)^k * (k - 1) * x^k / (1 - x^k).
a(n) = Sum_{d|n} (-1)^d * (d - 1).
a(n) = A048272(n) - A002129(n).
Faster converging series: A(q) = Sum_{n >= 1} (-1)^n*q^(n^2)*((n-1)*q^(3*n) + n*q^(2*n) + (n-2)*q^n + n-1)/((1 + q^n)*(1 - q^(2*n))) - apply the operator t*d/dt to equation 1 in Arndt, then set t = -q and x = q. - Peter Bala, Jan 22 2021
a(n) = A128315(n, 2). - G. C. Greubel, Jun 22 2024
Previous Showing 21-30 of 99 results. Next