OFFSET
1,9
COMMENTS
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..100000
Wikipedia, Domino tiling
Gus Wiseman, The a(91) = 5 domino tilings of (6,4).
MAPLE
h:= proc(l, f) option remember; local k; if min(l[])>0 then
`if`(nops(f)=0, 1, h(map(x-> x-1, l[1..f[1]]), subsop(1=[][], f)))
else for k from nops(l) while l[k]>0 by -1 do od;
`if`(nops(f)>0 and f[1]>=k, h(subsop(k=2, l), f), 0)+
`if`(k>1 and l[k-1]=0, h(subsop(k=1, k-1=1, l), f), 0)
fi
end:
g:= l-> `if`(add(`if`(l[i]::odd, (-1)^i, 0), i=1..nops(l))=0,
`if`(l=[], 1, h([0$l[1]], subsop(1=[][], l))), 0):
a:= n-> g(sort(map(i-> numtheory[pi](i[1])$i[2], ifactors(n)[2]), `>`)):
seq(a(n), n=1..120); # Alois P. Heinz, May 22 2018
MATHEMATICA
h[l_, f_] := h[l, f] = Module[{k}, If[Min[l] > 0, If[Length[f] == 0, 1, h[Map[Function[x, x-1], l[[Range @ f[[1]]]]], ReplacePart[f, 1 -> Nothing]]], For[k = Length[l], l[[k]] > 0, k-- ]; If[Length[f] > 0 && f[[1]] >= k, h[ReplacePart[l, k -> 2], f], 0] + If[k > 1 && l[[k-1]] == 0, h[ReplacePart[l, {k -> 1, k - 1 -> 1}], f], 0]]];
g[l_] := If[Sum[If[OddQ @ l[[i]], (-1)^i, 0], {i, 1, Length[l]}] == 0, If[l == {}, 1, h[Table[0, l[[1]]], ReplacePart[l, 1 -> Nothing]]], 0];
a[n_] := g[Reverse @ Sort[ Flatten[ Map[ Function[i, Table[PrimePi[i[[1]]], i[[2]]]], FactorInteger[n]]]]];
Array[a, 120] (* Jean-François Alcover, May 28 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 23 2018
STATUS
approved