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.

Showing 1-4 of 4 results.

A209423 Difference between the number of odd parts and the number of even parts in all the partitions of n.

Original entry on oeis.org

1, 1, 4, 4, 10, 13, 24, 30, 52, 68, 105, 137, 202, 264, 376, 485, 669, 864, 1162, 1486, 1968, 2501, 3256, 4110, 5285, 6630, 8434, 10511, 13241, 16417, 20505, 25273, 31344, 38438, 47346, 57782, 70746, 85947, 104663, 126594, 153386, 184793, 222865, 267452
Offset: 1

Views

Author

Clark Kimberling, Mar 08 2012

Keywords

Comments

a(n) = number of parts of odd multiplicity (each counted only once) in all partitions of n. Example: a(5) = 10 because we have [5'],[4',1'],[3',2'], [3',1,1],[2,2,1'],[2',1',1,1], and [1',1,1,1,1] (the 10 counted parts are marked). - Emeric Deutsch, Feb 08 2016

Examples

			The partitions of 5 are [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], and [1,1,1,1,1], a total of 15 odd parts and 5 even parts, so that a(5)=10.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local m, f, g;
          m:= irem(i, 2);
          if n=0 then [1, 0, 0]
        elif i<1 then [0, 0, 0]
        else f:= b(n, i-1); g:= `if`(i>n, [0$3], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+m*g[1], f[3]+g[3]+(1-m)*g[1]]
          fi
        end:
    a:= n-> b(n, n)[2] -b(n, n)[3]:
    seq(a(n), n=1..50);  # Alois P. Heinz, Jul 09 2012
    g := add(x^j/(1+x^j), j = 1 .. 80)/mul(1-x^j, j = 1 .. 80): gser := series(g, x = 0, 50): seq(coeff(gser, x, n), n = 0 .. 45); # Emeric Deutsch, Feb 08 2016
  • Mathematica
    f[n_, i_] := Count[Flatten[IntegerPartitions[n]], i]
    o[n_] := Sum[f[n, i], {i, 1, n, 2}]
    e[n_] := Sum[f[n, i], {i, 2, n, 2}]
    Table[o[n], {n, 1, 45}]  (* A066897 *)
    Table[e[n], {n, 1, 45}]  (* A066898 *)
    %% - %                   (* A209423 *)
    b[n_, i_] := b[n, i] = Module[{m, f, g}, m = Mod[i, 2]; If[n==0, {1, 0, 0}, If[i<1, {0, 0, 0}, f = b[n, i-1]; g = If[i>n, {0, 0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + m*g[[1]], f[[3]] + g[[3]] + (1-m)* g[[1]]}]]]; a[n_] := b[n, n][[2]] - b[n, n][[3]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Nov 16 2015, after Alois P. Heinz *)

Formula

a(n) = A066897(n) - A066898(n) = A206563(n,1) - A206563(n,2). - Omar E. Pol, Mar 08 2012
G.f.: Sum_{j>0} x^j/(1+x^j)/Product_{k>0}(1 - x^k). - Emeric Deutsch, Feb 08 2016
a(n) = Sum_{i=1..n} (-1)^(i + 1)*A181187(n, i). - John M. Campbell, Mar 18 2018
a(n) ~ log(2) * exp(Pi*sqrt(2*n/3)) / (2^(3/2) * Pi * sqrt(n)). - Vaclav Kotesovec, May 25 2018
For n > 0, a(n) = A305121(n) + A305123(n). - Vaclav Kotesovec, May 26 2018
a(n) = Sum_{k=-floor(n/2)+(n mod 2)..n} k * A240009(n,k). - Alois P. Heinz, Oct 23 2018
a(n) = Sum_{k>0} k * A264398(n,k). - Alois P. Heinz, Aug 05 2020

A116680 Number of even parts in all partitions of n into distinct parts.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 4, 5, 5, 8, 11, 14, 18, 23, 29, 37, 44, 55, 69, 83, 102, 124, 148, 178, 213, 253, 300, 356, 421, 494, 582, 680, 793, 926, 1074, 1246, 1446, 1668, 1922, 2215, 2545, 2918, 3345, 3823, 4366, 4982, 5668, 6445, 7321, 8300, 9401, 10639, 12021, 13566
Offset: 0

Views

Author

Emeric Deutsch, Feb 22 2006

Keywords

Examples

			a(9)=8 because in the partitions of 9 into distinct parts, namely, [9], [8,1], [7,2], [6,3], [6,2,1], [5,4], [5,3,1], and [4,3,2], we have a total of 8 even parts. [edited by _Rishi Advani_, Jun 07 2019]
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), 3*m); [0,0] cat Coefficients(R!( (&*[1+x^j: j in [1..4*m]])*(&+[x^(2*k)/(1+x^(2*k)): k in [1..2*m]]) )); // G. C. Greubel, Jun 07 2019
    
  • Maple
    f:=product(1+x^j,j=1..70)*sum(x^(2*j)/(1+x^(2*j)),j=1..40): fser:=series(f,x=0,65): seq(coeff(fser,x,n),n=0..60);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(i*(i+1)/2 p+`if`(i::odd, 0, [0, p[1]]))(b(n-i, min(n-i, i-1)))))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..60);  # Alois P. Heinz, May 24 2022
  • Mathematica
    With[{m = 25}, CoefficientList[Series[Product[1+x^j, {j,1,4*m}]* Sum[x^(2*k)/(1+x^(2*k)), {k,1,2*m}], {x,0,3*m}], x]] (* G. C. Greubel, Jun 07 2019 *)
  • PARI
    my(m=25); my(x='x+O('x^(3*m))); concat([0, 0], Vec( prod(j=1, 4*m, 1+x^j)*sum(k=1, 2*m, x^(2*k)/(1+x^(2*k))) )) \\ G. C. Greubel, Jun 07 2019
    
  • Sage
    m = 25
    R = PowerSeriesRing(ZZ, 'x')
    x = R.gen().O(3*m)
    s = product(1+x^j for j in (1..4*m))*sum(x^(2*k)/(1+x^(2*k)) for k in (1..2*m))
    [0, 0] + s.coefficients() # G. C. Greubel, Jun 07 2019

Formula

a(n) = Sum_{k >= 0} k*A116679(n,k).
G.f.: (Product_{j >= 1} (1+x^j)) * (Sum_{k >= 1} x^(2*k)/(1+x^(2*k))).
For n > 0, a(n) = A015723(n) - A116676(n). - Vaclav Kotesovec, May 26 2018
a(n) ~ 3^(1/4) * log(2) * exp(Pi*sqrt(n/3)) / (4*Pi*n^(1/4)). - Vaclav Kotesovec, May 26 2018

A305123 G.f.: Sum_{k>=1} x^(2*k-1)/(1+x^(2*k-1)) * Product_{k>=1} 1/(1-x^k).

Original entry on oeis.org

0, 1, 0, 3, 2, 7, 6, 15, 16, 32, 36, 62, 74, 117, 142, 214, 264, 377, 468, 648, 806, 1090, 1354, 1791, 2224, 2894, 3580, 4598, 5670, 7193, 8838, 11102, 13588, 16925, 20632, 25501, 30972, 38021, 46000, 56135, 67668, 82119, 98642, 119115, 142592, 171412, 204520
Offset: 0

Views

Author

Vaclav Kotesovec, May 26 2018

Keywords

Comments

Conjecture: a(n) is odd iff n is a term of A067567. - Peter Bala, Jan 10 2025

Crossrefs

Programs

  • Mathematica
    nmax = 60; CoefficientList[Series[Sum[x^(2*k-1)/(1+x^(2*k-1)), {k, 1, nmax}] * Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

For n > 0, a(n) = A209423(n) - A305121(n).
a(n) ~ log(2) * exp(Pi*sqrt(2*n/3)) / (2^(5/2)*Pi*sqrt(n)).

A305122 G.f.: Sum_{k>=1} x^(2*k)/(1+x^(2*k)) * Product_{k>=1} (1+x^k)/(1-x^k).

Original entry on oeis.org

0, 0, 1, 2, 4, 8, 16, 28, 47, 78, 126, 198, 306, 464, 694, 1024, 1490, 2146, 3061, 4322, 6052, 8408, 11592, 15872, 21592, 29192, 39242, 52468, 69788, 92376, 121716, 159664, 208569, 271372, 351732, 454228, 584546, 749720, 958472, 1221560, 1552210, 1966698
Offset: 0

Views

Author

Vaclav Kotesovec, May 26 2018

Keywords

Comments

Convolution of A305121 and A000009.
The g.f. Sum_{k >= 1} x^(2*k)/(1 + x^(2*k)) * Product_{k >= 1} (1 + x ^k)/(1 - x^k) = Sum_{k >= 1} x^(2*k)/(1 + x^(2*k)) * Product_{k >= 1} (1 + x ^k)/(1 + x^k - 2*x^k) is congruent mod 2 to Sum_{k >= 1} x^(2*k)/(1 + x^(2*k)) = -G(-x^2), where G(x) is the g.f. of A112329. It follows that a(n) is odd iff n = 2*k^2 for some positive integer k. - Peter Bala, Jan 07 2025

Crossrefs

Programs

  • Mathematica
    nmax = 50; CoefficientList[Series[Sum[x^(2*k)/(1+x^(2*k)), {k, 1, nmax}] * Product[(1+x^k)/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

a(n) = A305101(n) - A305124(n).
a(n) ~ exp(sqrt(n)*Pi) * log(2) / (8*Pi*sqrt(n)).
Showing 1-4 of 4 results.