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.

A066183 Total sum of squares of parts in all partitions of n.

Original entry on oeis.org

1, 6, 17, 44, 87, 180, 311, 558, 910, 1494, 2302, 3608, 5343, 7986, 11554, 16714, 23549, 33270, 45942, 63506, 86338, 117156, 156899, 209926, 277520, 366260, 479012, 624956, 808935, 1044994, 1340364, 1715572, 2182935, 2770942, 3499379
Offset: 1

Views

Author

Wouter Meeussen, Dec 15 2001

Keywords

Comments

Sum of hook lengths of all boxes in the Ferrers diagrams of all partitions of n (see the Guo-Niu Han paper, p. 25, Corollary 6.5). Example: a(3) = 17 because for the partitions (3), (2,1), (1,1,1) of n=3 the hook length multi-sets are {3,2,1}, {3,1,1}, {3,2,1}, respectively; the total sum of all hook lengths is 6+5+6 = 17. - Emeric Deutsch, May 15 2008
Partial sums of A206440. - Omar E. Pol, Feb 08 2012
Column k=2 of A213191. - Alois P. Heinz, Sep 20 2013
Row sums of triangles A180681, A206561 and A299768. - Omar E. Pol, Mar 20 2018

Examples

			a(3) = 17 because the squares of all partitions of 3 are {9}, {4,1} and {1,1,1}, summing to 17.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g, h;
          if n=0 then [1, 0]
        elif i<1 then [0, 0]
        elif i>n then b(n, i-1)
        else g:= b(n, i-1); h:= b(n-i, i);
             [g[1]+h[1], g[2]+h[2] +h[1]*i^2]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..40);  # Alois P. Heinz, Feb 23 2012
    # second Maple program:
    g := (sum(k^2*x^k/(1-x^k), k = 1..100))/(product(1-x^k, k = 1..100)): gser := series(g, x = 0, 45): seq(coeff(gser, x, m), m = 1 .. 40); # Emeric Deutsch, Dec 06 2015
  • Mathematica
    Table[Apply[Plus, IntegerPartitions[n]^2, {0, 2}], {n, 30}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = Module[{g, h}, Which[n==0, {1, 0}, i<1, {0, 0}, i>n, b[n, i-1], True, g = b[n, i-1]; h = b[n-i, i]; {g[[1]] + h[[1]], g[[2]] + h[[2]] + h[[1]]*i^2}]]; a[n_] :=  b[n, n][[2]]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Aug 31 2015, after Alois P. Heinz *)
  • PARI
    a(n)=my(s); forpart(v=n,s+=sum(i=1,#v,v[i]^2));s \\ Charles R Greathouse IV, Aug 31 2015
    
  • PARI
    a(n)=sum(k=1,n,sigma(k,2)*numbpart(n-k)) \\ Charles R Greathouse IV, Aug 31 2015

Formula

a(n) = Sum_{k=1..n} sigma_2(k)*numbpart(n-k), where sigma_2(k)=sum of squares of divisors of k=A001157(k). - Vladeta Jovovic, Jan 26 2002
a(n) = Sum_{k>=0} k*A265245(n,k). - Emeric Deutsch, Dec 06 2015
G.f.: g(x) = (Sum_{k>=1} k^2*x^k/(1-x^k))/Product_{q>=1} (1-x^q). - Emeric Deutsch, Dec 06 2015
a(n) ~ 3*sqrt(2)*Zeta(3)/Pi^3 * exp(Pi*sqrt(2*n/3)) * sqrt(n). - Vaclav Kotesovec, May 28 2018

Extensions

More terms from Naohiro Nomoto, Feb 07 2002

A206561 Triangle read by rows: T(n,k) = total sum of parts >= k in all partitions of n.

Original entry on oeis.org

1, 4, 2, 9, 5, 3, 20, 13, 7, 4, 35, 23, 15, 9, 5, 66, 47, 31, 19, 11, 6, 105, 75, 53, 35, 23, 13, 7, 176, 131, 93, 66, 42, 27, 15, 8, 270, 203, 151, 106, 74, 49, 31, 17, 9, 420, 323, 241, 178, 126, 86, 56, 35, 19, 10, 616, 477, 365, 272, 200, 140, 98, 63, 39, 21, 11
Offset: 1

Views

Author

Omar E. Pol, Feb 14 2012

Keywords

Comments

From Omar E. Pol, Mar 18 2018: (Start)
In the n-th row of the triangle the first differences together with its last term give the n-th row of triangle A138785 (see below):
Row..........: 1 2 3 4 5 ...
--- ---- ------- ------------ ----------------
This triangle: 1; 4, 2; 9, 5, 3; 20, 13, 7, 4; 35, 23, 15, 9, 5; ...
| | /| | /| /| | / | /| /| | / | / | /| /|
| |/ | |/ |/ | |/ |/ |/ | |/ |/ |/ |/ |
A138785......: 1; 2, 2; 4, 2, 3; 7, 6, 3, 4; 12, 8, 6, 4, 5; ... (End)

Examples

			Triangle begins:
    1;
    4,  2;
    9,  5,  3;
   20, 13,  7,  4;
   35, 23, 15,  9,  5;
   66, 47, 31, 19, 11,  6;
  105, 75, 53, 35, 23, 13,  7;
  ...
		

Crossrefs

Columns 1-2 give A066186, A194552.
Right border gives A000027.
Row sums give A066183. - Omar E. Pol, Mar 19 2018
Both A180681 and A299768 have the same row sums as this triangle. - Omar E. Pol, Mar 21 2018

Programs

  • Mathematica
    Table[With[{s = IntegerPartitions[n]}, Table[Total@ Flatten@ Map[Select[#, # >= k &] &, s], {k, n}]], {n, 11}] // Flatten (* Michael De Vlieger, Mar 19 2018 *)

Formula

T(n,n) = n, T(n,k) = T(n,k+1) + k * A066633(n,k) for k < n.
T(n,k) = Sum_{i=k..n} A138785(n,i).

Extensions

More terms from Alois P. Heinz, Feb 14 2012

A180681 T(n,k) is the sum of the hook lengths over the partitions of n with exactly k parts.

Original entry on oeis.org

1, 3, 3, 6, 5, 6, 10, 16, 8, 10, 15, 23, 22, 12, 15, 21, 47, 44, 30, 17, 21, 28, 62, 74, 56, 40, 23, 28, 36, 104, 115, 114, 71, 52, 30, 36, 45, 130, 196, 162, 139, 89, 66, 38, 45, 55, 195, 268, 286, 227, 169, 110, 82, 47, 55, 66, 235, 395, 407, 369, 269, 204, 134, 100, 57, 66
Offset: 1

Views

Author

Wouter Meeussen, Sep 16 2010

Keywords

Comments

Row sums equal A066183 ('Total sum of squares of parts in all partitions of n').
From Omar E. Pol, Mar 20 2018: (Start)
Both column 1 and leading diagonal give A000217, n >= 1.
Both A206561 and A299768 have the same row sums as this triangle.
Apparently the second diagonal gives A133263 without the first term. (End)

Examples

			T(5,3) = 22 since the partitions of 5 in 3 parts are 221 and 311, with hook lengths {{2,4}, {1,3}, {1}} and {{1,2,5}, {2}, {1}} summing to 22.
Triangle T(n,k) begins:
   1;
   3,   3;
   6,   5,   6;
  10,  16,   8,  10;
  15,  23,  22,  12,  15;
  21,  47,  44,  30,  17,  21;
  28,  62,  74,  56,  40,  23,  28;
  36, 104, 115, 114,  71,  52,  30, 36;
  45, 130, 196, 162, 139,  89,  66, 38, 45;
  55, 195, 268, 286, 227, 169, 110, 82, 47, 55;
		

Crossrefs

T(2n-1,n) gives A301499.

Programs

  • Maple
    f:= n-> (n-1)*n/2:
    b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, n+f(n)],
          b(n, i-1)+(p-> p+[0, p[1]*(n+f(i))])(b(n-i, min(n-i, i))))
        end:
    T:= (n, k)-> (p-> p[1]*(n+f(k))+p[2])(b(n-k, min(n-k, k))):
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Mar 20 2018
  • Mathematica
    (*Needs["DiscreteMath`Combinatorica`"]; hooklength[(p_)?PartitionQ] := Block[{ferr = (PadLeft[1 + 0*Range[ #1], Max[p]] & ) /@ p}, DeleteCases[(Rest[FoldList[Plus, 0, #1]] & ) /@ ferr + Reverse /@ Reverse[Transpose[(Rest[FoldList[Plus, 0, #1]] & ) /@ Reverse[Reverse /@ Transpose[ferr]]]], 0, {2}] - 1]; partitionexact[n_, m_] := TransposePartition /@ (Prepend[ #1, m] & ) /@ Partitions[n - m, m] *); Table[Tr[ Tr[ Flatten[hooklength[ # ]]] &/@ partitionexact[n,k] ] ,{n,16},{k,n}]
    (* Second program: *)
    Table[p = IntegerPartitions[n, {k}]; Total@Table[y = Table[Boole[p[[l]][[i]] >= j], {i, k}, {j, n}]; Total[Table[Total[{y[[i, j ;; n]], y[[i + 1 ;; k, j]]}, 2], {i, k}, {j, n}], 2], {l, Length[p]}], {n, 11}, {k, n}] // Flatten (* Robert Price, Jun 19 2020 *)
    f[n_] := n(n-1)/2;
    b[n_, i_] := b[n, i] = If[n == 0 || i == 1, {1, n + f[n]}, b[n, i - 1] + Function[p, p + {0, p[[1]] (n + f[i])}][b[n - i, Min[n - i, i]]]];
    T[n_, k_] := Function[p, p[[1]] (n + f[k]) + p[[2]]][b[n-k, Min[n-k, k]]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, Dec 12 2020, after Alois P. Heinz *)

A299769 Triangle read by rows: T(n,k) is the sum of all squares of the parts k in the last section of the set of partitions of n, with n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 1, 4, 2, 0, 9, 3, 8, 0, 16, 5, 4, 9, 0, 25, 7, 16, 18, 16, 0, 36, 11, 12, 18, 16, 25, 0, 49, 15, 32, 27, 48, 25, 36, 0, 64, 22, 28, 54, 32, 50, 36, 49, 0, 81, 30, 60, 54, 80, 75, 72, 49, 64, 0, 100, 42, 60, 90, 80, 100, 72, 98, 64, 81, 0, 121, 56, 108, 126, 160, 125, 180, 98, 128, 81, 100, 0, 144
Offset: 1

Views

Author

Omar E. Pol, Mar 20 2018

Keywords

Comments

The partial sums of the k-th column of this triangle give the k-th column of triangle A299768.
Note that the last section of the set of partitions of n is also the n-th section of the set of partitions of any positive integer >= n.

Examples

			Triangle begins:
   1;
   1,   4;
   2,   0,   9;
   3,   8,   0,  16;
   5,   4,   9,   0,  25;
   7,  16,  18,  16,   0,  36;
  11,  12,  18,  16,  25,   0,  49;
  15,  32,  27,  48,  25,  36,   0,  64;
  22,  28,  54,  32,  50,  36,  49,   0,  81;
  30,  60,  54,  80,  75,  72,  49,  64,   0, 100;
  42,  60,  90,  80, 100,  72,  98,  64,  81,   0, 121;
  56, 108, 126, 160, 125, 180,  98, 128,  81, 100,   0, 144;
  ...
Illustration for the 4th row of triangle:
.
.                                  Last section of the set
.        Partitions of 4.          of the partitions of 4.
.       _ _ _ _                              _
.      |_| | | |  [1,1,1,1]                 | |  [1]
.      |_ _| | |  [2,1,1]                   | |  [1]
.      |_ _ _| |  [3,1]                _ _ _| |  [1]
.      |_ _|   |  [2,2]               |_ _|   |  [2,2]
.      |_ _ _ _|  [4]                 |_ _ _ _|  [4]
.
For n = 4 the last section of the set of partitions of 4 is [4], [2, 2], [1], [1], [1], so the squares of the parts are respectively [16], [4, 4], [1], [1], [1]. The sum of the squares of the parts 1 is 1 + 1 + 1 = 3. The sum of the squares of the parts 2 is 4 + 4 = 8. The sum of the squares of the parts 3 is 0 because there are no parts 3. The sum of the squares of the parts 4 is 16. So the fourth row of triangle is [3, 8, 0, 16].
		

Crossrefs

Column 1 is A000041.
Leading diagonal gives A000290, n >= 1.
Second diagonal gives A000007.
Row sums give A206440.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, 1+n*x, b(n, i-1)+
          (p-> p+(coeff(p, x, 0)*i^2)*x^i)(b(n-i, min(n-i, i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n$2)-b(n-1$2)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Jul 23 2018
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0 || i==1, 1 + n*x, b[n, i-1] + Function[p, p + (Coefficient[p, x, 0]*i^2)*x^i][b[n-i, Min[n-i, i]]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n, n] - b[n-1, n-1]];
    T /@ Range[14] // Flatten (* Jean-François Alcover, Dec 10 2019, after Alois P.heinz *)

Formula

T(n,k) = A299768(n,k) - A299768(n-1,k). - Alois P. Heinz, Jul 23 2018
Showing 1-4 of 4 results.