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.

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