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-3 of 3 results.

A194795 Imbalance of the number of partitions of n.

Original entry on oeis.org

0, -1, 0, -2, 0, -4, 0, -7, 1, -11, 3, -18, 6, -28, 13, -42, 24, -64, 41, -96, 69, -141, 112, -208, 175, -303, 271, -437, 410, -629, 609, -898, 896, -1271, 1302, -1792, 1868, -2510, 2660, -3493, 3752, -4839, 5248, -6666, 7293, -9131, 10065, -12454
Offset: 1

Views

Author

Omar E. Pol, Feb 02 2012

Keywords

Comments

Consider the three-dimensional structure of the shell model of partitions version "tree". Note that only the parts > 1 produce the imbalance. The 1's are located in the central columns. Note that every column contains exactly the same parts, the same as a periodic table (see example). For more information see A135010.

Examples

			For n = 6 the illustration of the three views of the shell model with 6 shells shows an imbalance (see below):
------------------------------------------------------
Partitions                Tree             Table 1.0
of 6.                    A194805            A135010
------------------------------------------------------
6                   6                     6 . . . . .
3+3                   3                   3 . . 3 . .
4+2                     4                 4 . . . 2 .
2+2+2                     2               2 . 2 . 2 .
5+1                         1   5         5 . . . . 1
3+2+1                       1 3           3 . . 2 . 1
4+1+1                   4   1             4 . . . 1 1
2+2+1+1                   2 1             2 . 2 . 1 1
3+1+1+1                     1 3           3 . . 1 1 1
2+1+1+1+1                 2 1             2 . 1 1 1 1
1+1+1+1+1+1                 1             1 1 1 1 1 1
------------------------------------------------------
.
.                   6 3 4 2 1 3 5
.     Table 2.0     . . . . 1 . .     Table 2.1
.      A182982      . . . 2 1 . .      A182983
.                   . 3 . . 1 2 .
.                   . . 2 2 1 . .
.                   . . . . 1
------------------------------------------------------
The number of partitions with parts on the left hand side is equal to 7 and the number of partitions with parts on the right hand side is equal to 3, so a(6) = -7+3 = -4. On the other hand; for n = 6 the first n terms of A002865 (with positive indices) are 0, 1, 1, 2, 2, 4 therefore a(6) = 0-1+1-2+2-4 = -4.
		

Crossrefs

Programs

  • Maple
    with(combinat):
    a:= proc(n) option remember;
          (-1)^n *(numbpart(n-1)-numbpart(n)) +`if`(n>1, a(n-1), 0)
        end:
    seq(a(n), n=1..70); # Alois P. Heinz, Apr 09 2012
  • Mathematica
    a[n_] := a[n] = (-1)^n*(PartitionsP[n-1]-PartitionsP[n]) + If[n>1, a[n-1], 0]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)
    nmax = 60; Rest[CoefficientList[Series[x/(1-x) - (1+x)/(1-x) * Product[1/((1 + x^(2*k-1))*(1 - x^(2*k))), {k, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Nov 11 2015 *)
    nmax = 60; Rest[CoefficientList[Series[-x/(1+x) - (1-x)/(1+x) * Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Nov 11 2015 *)

Formula

a(n) = Sum_{k=1..n} (-1)^(k-1)*(p(k)-p(k-1)), where p(k) is the number of partitions of k.
a(n) = Sum_{k=1..n} (-1)^(k-1)*A002865(k).
a(n) = (-1)^(n+1) * (A240690(n+1) - A240690(n)) - 1. - Vaclav Kotesovec, Nov 11 2015
a(n) ~ (-1)^(n+1) * Pi * exp(Pi*sqrt(2*n/3)) / (24*sqrt(2)*n^(3/2)). - Vaclav Kotesovec, Nov 11 2015

A194796 Imbalance of the number of parts of all partitions of n.

Original entry on oeis.org

0, -1, 0, -3, 0, -8, 0, -17, 3, -31, 10, -58, 22, -101, 52, -167, 104, -278, 191, -451, 344, -711, 594, -1119, 983, -1730, 1606, -2635, 2555, -3990, 3978, -5972, 6118, -8835, 9269, -12986, 13835, -18917, 20454, -27320, 29900, -39204, 43268, -55846, 62112
Offset: 1

Views

Author

Omar E. Pol, Feb 01 2012

Keywords

Comments

Consider the three-dimensional structure of the shell model of partitions, version "tree" (see the illustration in A194795). Note that only the parts > 1 produce the imbalance. The 1's are located in the central columns therefore they do not produce the imbalance. For more information see A135010.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, 0]
        else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+g[1]]
          fi
        end:
    a:= proc(n) option remember;
          (-1)^n*(b(n-1, n-1)[2]-b(n, n)[2])+`if`(n=1, 0, a(n-1))
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Apr 04 2012
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{f, g}, If[n == 0 || i == 1, {1, 0}, f = b[n, i-1]; g = If[i>n, {0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + g[[1]]}]]; a[n_] := a[n] = (-1)^n*(b[n-1, n-1][[2]] - b[n, n][[2]]) + If[n == 1, 0, a[n-1]]; Table [a[n], {n, 1, 60}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)
  • PARI
    vector(50, n, sum(k=1, n, (-1)^(k-1)*(numdiv(k)-1+sum(j=1, k-1, (numdiv(j)-1)*(numbpart(k-j)-numbpart(k-j-1)))))) \\ Altug Alkan, Nov 11 2015

Formula

a(n) = Sum_{k=1..n} (-1)^(k-1)*A138135(k).

Extensions

More terms from Alois P. Heinz, Apr 04 2012

A194809 Imbalance of the sum of largest parts of all partitions of n.

Original entry on oeis.org

0, -2, 1, -5, 3, -12, 7, -25, 17, -47, 36, -88, 69, -155, 133, -262, 240, -439, 415, -717, 705, -1142, 1165, -1803, 1874, -2797, 2975, -4276, 4632, -6478, 7094, -9698, 10741, -14355, 16059, -21079, 23719, -30670, 34716, -44243, 50315, -63372
Offset: 1

Views

Author

Omar E. Pol, Feb 02 2012

Keywords

Comments

Consider the three-dimensional structure of the shell model of partitions version "tree". Note that only the larges parts > 1 produce the imbalance. Note that every column where is located a largest part contains largest parts of the same size, thesame as a periodic table (see example). For more information see A135010.

Examples

			For n = 6 the illustration of the shell model with 6 shells shows an imbalance of largest parts (see below):
------------------------------------------------------
Partitions                Tree             Table 1.0
of 6.                    A194805            A135010
------------------------------------------------------
6                   6                     6 . . . . .
3+3                   3                   3 . . 3 . .
4+2                     4                 4 . . . 2 .
2+2+2                     2               2 . 2 . 2 .
5+1                         1   5         5 . . . . 1
3+2+1                       1 3           3 . . 2 . 1
4+1+1                   4   1             4 . . . 1 1
2+2+1+1                   2 1             2 . 2 . 1 1
3+1+1+1                     1 3           3 . . 1 1 1
2+1+1+1+1                 2 1             2 . 1 1 1 1
1+1+1+1+1+1                 1             1 1 1 1 1 1
------------------------------------------------------
The sum of largest parts > 1 on the left hand side is 23 and the sum of largest parts > 1 on the right hand side is 11, so a(6) = -23 + 11 = -12. On the other hand for n = 6 we have that 0 together with the first n-1 terms > 1 of A138137 are 0, 2, 3, 6, 8, 15 so a(6) = 0-2+3-6+8-15 = -12.
		

Crossrefs

Formula

a(n) = Sum_{k=2..n} (-1)^(k-1)*A138137(k), n >= 2.
Showing 1-3 of 3 results.