login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A226897
a(n) is the total number of parts in the set of partitions of an n X n square lattice into squares, considering only the list of parts.
2
1, 5, 16, 59, 156, 529, 1351, 3988, 10236, 27746, 66763, 176783, 412450
OFFSET
1,2
COMMENTS
The sequence was derived from the documents in the Links section. The documents are first specified in the Links section of A034295.
EXAMPLE
For n = 3, the partitions are:
Square side 1 2 3 Total Parts
9 0 0 9
5 1 0 6
0 0 1 1
Total 16
So a(3) = 16.
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-> add(coeff(add(j, j=b(n, [0$n])), x, i), i=1..n):
seq(a(n), n=1..9); # Alois P. Heinz, Jun 21 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, k = Position[l, 0, 1, 1][[1, 1]]; 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_] := Sum[Coefficient[Sum[j, {j, b[n, Array[0&, n]]}], x, i], {i, 1, n}]; Table[a[n], {n, 1, 9}] (* Jean-François Alcover, May 29 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
STATUS
approved