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

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

A197979 a(n) = round((6*n+1/n)^n).

Original entry on oeis.org

7, 156, 6162, 345818, 25120872, 2237952687, 236084694122, 28771727614749, 3977205817386553, 614815375624938276, 105089416995538138498, 19679693805738843682351, 4006775128162674717660622
Offset: 1

Views

Author

Vincenzo Librandi, Oct 20 2011

Keywords

Crossrefs

Programs

  • Magma
    [Round((6*n+1/n)^n): n in [1..20]];
  • Mathematica
    Table[Round[(6n+1/n)^n],{n,20}] (* Harvey P. Dale, Jul 30 2024 *)
Showing 1-2 of 2 results.