OFFSET
0,3
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..50 (terms n = 0..30 from Seiichi Manyama)
FORMULA
a(n) = [x^(n^3-n^2)] Product_{k=1..n^2} 1/(1-x^k).
EXAMPLE
n | Partitions of n^3 into exactly n^2 parts
--+-------------------------------------------------
1 | 1.
2 | 5+1+1+1 = 4+2+1+1 = 3+3+1+1 = 3+2+2+1 = 2+2+2+2.
MAPLE
b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
b(n, i-1)+b(n-i, min(i, n-i)))
end:
a:= n-> b(n^3-n^2, n^2):
seq(a(n), n=0..15); # Alois P. Heinz, May 08 2018
MATHEMATICA
$RecursionLimit = 2000;
b[n_, i_] := b[n, i] = If[n==0 || i==1, 1, b[n, i-1]+b[n-i, Min[i, n-i]]];
a[n_] := b[n^3 - n^2, n^2]; a /@ Range[0, 15] (* Jean-François Alcover, Nov 15 2020, after Alois P. Heinz *)
PROG
(PARI) {a(n) = polcoeff(prod(k=1, n^2, 1/(1-x^k+x*O(x^(n^3-n^2)))), n^3-n^2)}
(Python)
import sys
from functools import lru_cache
sys.setrecursionlimit(10**6)
@lru_cache(maxsize=None)
def b(n, i): return 1 if n == 0 or i == 1 else b(n, i-1)+b(n-i, min(i, n-i))
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, May 08 2018
STATUS
approved