OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (terms n = 0..197 from Reinhard Zumkeller)
MAPLE
with(numtheory):
a:= proc(n) local b, l; l:= sort([(divisors(n) minus {n})[]]):
b:= proc(m, i) option remember; `if`(m=0 or i=1, 1,
`if`(i<1, 0, b(m, i-1)+`if`(l[i]>m, 0, b(m-l[i], i))))
end; forget(b):
b(n, nops(l))
end:
seq(a(n), n=0..100); # Alois P. Heinz, Jan 29 2013
MATHEMATICA
a[n_] := Module[{b, l}, l = Most[Divisors[n]]; b[m_, i_] := b[m, i] = If[m==0 || i==1, 1, If[i<1, 0, b[m, i-1] + If[l[[i]]>m, 0, b[m-l[[i]], i]]]]; b[n, Length[l]]]; a[0]=1; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 02 2017, after Alois P. Heinz *)
PROG
(Haskell)
a210442 n = p (a027751_row n) n where
p _ 0 = 1
p [] _ = 0
p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Jan 21 2013
STATUS
approved