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.

A225622 A(n,k) is the total number of parts in the set of partitions of an n X k rectangle into integer-sided squares, considering only the list of parts; square array A(n,k), n>=1, k>=1, read by antidiagonals.

Original entry on oeis.org

1, 2, 2, 3, 5, 3, 4, 9, 9, 4, 5, 15, 16, 15, 5, 6, 21, 31, 31, 21, 6, 7, 30, 47, 59, 47, 30, 7, 8, 38, 73, 102, 102, 73, 38, 8, 9, 50, 101, 170, 156, 170, 101, 50, 9, 10, 60, 142, 250, 307, 307, 250, 142, 60, 10, 11, 75, 185, 375, 460, 529, 460, 375, 185, 75, 11
Offset: 1

Views

Author

Keywords

Examples

			The square array starts:
1    2    3    4    5    6    7    8    9   10   11   12 ...
2    5    9   15   21   30   38   50   60   75   87  105 ...
3    9   16   31   47   73  101  142  185  244  305  386 ...
4   15   31   59  102  170  250  375  523  726  962 ...
5   21   47  102  156  307  460  711 1040 1517 ...
6   30   73  170  307  529  907 1474 2204 ...
7   38  101  250  460  907 1351 2484 ...
8   50  142  375  711 1474 2484 ...
9   60  185  523 1040 2204 ...
...
A(3,2) = 9 because there are 9 parts overall in the 2 partitions of a 3 X 2 rectangle into squares with integer sides.  One partition comprises 6 1 X 1 squares and the other 2 1 X 1 squares and 1 2 X 2 square giving 9 parts in total.
		

Crossrefs

Diagonal = A226897.

Programs

  • Maple
    b:= proc(n, l) option remember; local i, k, s, t;
          if max(l[])>n then {} elif n=0 or l=[] then {0}
        elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
        else for k do if l[k]=0 then break fi od; s:={};
             for i from k to nops(l) while l[i]=0 do s:=s union
                 map(v->v+x^(1+i-k), b(n, [l[j]$j=1..k-1,
                     1+i-k$j=k..i, l[j]$j=i+1..nops(l)]))
             od; s
          fi
        end:
    A:= (n, k)-> add(coeff(add(j, j=b(max(n, k),
                [0$min(n, k)])), x, i), i=1..n):
    seq(seq(A(n, 1+d-n), n=1..d), d=1..15); # Alois P. Heinz, Aug 04 2013
  • Mathematica
    $RecursionLimit = 1000; b[n_, l_List] := b[n, l] = Module[{i, k, s, t}, Which[ Max[l]>n, {}, n == 0 || l == {}, {0}, Min[l]>0, t = Min[l]; b[n-t, l-t], True, For[k = 1, True, k++, If[l[[k]] == 0, Break[]]]; s = {}; For[i = k, i <= Length[l] && l[[i]] == 0, i++, s = s ~Union~ Map[Function[{v}, v + x^(1+i-k) ], b[n, Join[l[[1 ;; k-1]], Array[1+i-k&, i-k+1], l[[i+1 ;; -1]]]]]]; s]];A[n_, k_] := Sum[Coefficient[Sum[j, {j, b[Max[n, k], Array[0&, Min[n, k]]]}], x, i], {i, 1, n}]; Table[Table[A[n, 1+d-n], {n, 1, d}], {d, 1, 15}] // Flatten (* Jean-François Alcover, Mar 06 2015, after Alois P. Heinz *)

Formula

A(n,1) = A000027(n) = n.
A(n,2) = A195014(n) = (n+1)(5n+3)/8 when n is odd
and 5n(n+2)/8 when n is even.

A226906 Triangle read by rows: T(n,k) is the total number of parts of size k^2, 1 <= k <= n, in the set of partitions of an n X n square lattice into squares, considering only the list of parts.

Original entry on oeis.org

1, 4, 1, 14, 1, 1, 47, 10, 1, 1, 134, 16, 4, 1, 1, 415, 82, 24, 6, 1, 1, 1102, 165, 60, 16, 6, 1, 1, 3076, 621, 169, 90, 22, 8, 1, 1, 7986, 1361, 577, 194, 80, 28, 8, 1, 1, 20930, 4254, 1464, 643, 294, 114, 35, 10, 1, 1, 50755, 9494, 3667, 1491, 858, 297, 148, 41, 10, 1, 1
Offset: 1

Views

Author

Keywords

Comments

The sequence was derived from the documents in the Links section. The documents are first specified in the Links section of A034295.
The triangle is presented below.
\ k 1 2 3 4 5 6 7 8 9 10 11 12 13
n
1 1
2 4 1
3 14 1 1
4 47 10 1 1
5 134 16 4 1 1
6 415 82 24 6 1 1
7 1102 165 60 16 6 1 1
8 3076 621 169 90 22 8 1 1
9 7986 1361 577 194 80 28 8 1 1
10 20930 4254 1464 643 294 114 35 10 1 1
11 50755 9494 3667 1491 858 297 148 41 10 1 1
12 129977 27241 10474 4858 2239 1272 454 203 51 12 1 1
13 305449 60086 24702 11034 5918 2874 1474 592 249 58 12 1 1

Examples

			For n = 3, the partitions are:
Square side 1 2 3
            9 0 0
            5 1 0
            0 0 1
Total      14 1 1
So T(3,1) = 14, T(3,2) = 1, T(3,3) = 1.
		

Crossrefs

Row sums give: A226897.
Cf. A034295.

Programs

  • Maple
    b:= proc(n, l) option remember; local i, k, s, t;
          if max(l[])>n then {} elif n=0 or l=[] then {0}
        elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
        else for k do if l[k]=0 then break fi od; s:={};
             for i from k to nops(l) while l[i]=0 do s:=s union
                 map(v->v+x^(1+i-k), b(n, [l[j]$j=1..k-1,
                     1+i-k$j=k..i, l[j]$j=i+1..nops(l)]))
             od; s
          fi
        end:
    T:= n-> seq(coeff(add(j, j=b(n, [0$n])), x, i), i=1..n):
    seq(T(n), n=1..10);  # Alois P. Heinz, Jun 21 2013
  • Mathematica
    b[n_, l_List] := b[n, l] = Module[{i, k, s, t}, Which[Max[l] > n, {}, n == 0 || l == {}, {0}, Min[l] > 0, t = Min[l]; b[n - t, l - t], True, For[k = 1, k <= Length[l], k++, If[l[[k]] == 0, Break[]]]; s = {}; For[i = k, i <= Length[l] && l[[i]] == 0, i++, s = s ~Union~ Map[# + x^(1 + i - k)&, b[n, Join[l[[1 ;; k - 1]], Array[1 + i - k &, i - k + 1], l[[i + 1 ;; Length[l]]]]]]]; s]]; T[n_] := Table[Coefficient[Sum[j, {j, b[n, Array[0 &, n]]}], x, i], {i, 1, n}]; Table[T[n], {n, 1, 10}] // Flatten (* Jean-François Alcover, Jan 24 2016, after Alois P. Heinz *)

Formula

Sum_{k=1..n} T(n,k) * k^2 = A034295(n) * n^2.
Showing 1-2 of 2 results.