OFFSET
0,11
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
EXAMPLE
a(0) = 1: 0 = the empty sum.
a(4) = 1: 4 = 2*2.
a(6) = 1: 6 = 2*3.
a(8) = 1: 8 = 2*4.
a(9) = 1: 9 = 3*3.
a(10) = 2: 10 = 2*2 + 2*3 = 2*5.
a(12) = 3: 12 = 2*2 + 2*4 = 2*6 = 3*4.
a(13) = 1: 13 = 2*2 + 3*3.
a(14) = 3: 14 = 2*3 + 2*4 = 2*2 + 2*5 = 2*7.
a(15) = 2: 15 = 2*3 + 3*3 = 3*5.
a(16) = 5: 16 = 2*3 + 2*5 = 2*2 + 2*6 = 2*2 + 3*4 = 2*8 = 4*4.
a(19) = 2: 19 = 2*2 + 2*3 + 3*3 = 2*2 + 3*5.
MAPLE
with(numtheory):
b:= proc(n, m, i, j) option remember;
`if`(n=0, 1, `if`(m<4, 0, b(n, m-1, i, j) +`if`(m>n, 0,
add(b(n-m, m-1, min(i, k), min(j, m/k)), k=select(x->
is(x>1 and x<=min(sqrt(m), i) and m<=j*x), divisors(m))))))
end:
a:= n-> b(n$4):
seq(a(n), n=0..30);
MATHEMATICA
b[n_, m_, i_, j_] := b[n, m, i, j] = If[n == 0, 1, If[m < 4, 0, b[n, m - 1, i, j] + If[m > n, 0, Sum [b[n - m, m - 1, Min[i, k], Min[j, m/k]], {k, Select[Divisors[m], # > 1 && # <= Min [Sqrt[m], i] && m <= j*# &]}]]]];
a[n_] := b[n, n, n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 23 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 06 2012
STATUS
approved