OFFSET
0,8
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2000 (terms 0..150 from Reinhard Zumkeller)
EXAMPLE
a(10) = #{7+3, 6+4} = 2;
a(11) = #{9+2, 8+3, 7+4, 6+5, 6+3+2, 5+4+2} = 6;
a(12) = #{7+5} = 1;
a(13) = #{11+2, 10+3, 9+4, 8+5, 8+3+2, 7+6, 7+4+2, 6+5+2, 6+4+3} = 9;
a(14) = #{11+3, 10+4, 9+5, 8+6, 6+5+3} = 5;
a(15) = #{13+2, 11+5, 9+6, 9+4+2, 8+7, 8+5+2} = 6.
MAPLE
a:= proc(n) option remember; local b, l;
l:= sort([({$1..n} minus numtheory[divisors](n))[]]);
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1) +`if`(l[i]>n, 0, b(n-l[i], i-1))))
end: forget(b):
b(n, nops(l))
end:
seq(a(n), n=0..80); # Alois P. Heinz, Jan 18 2013
MATHEMATICA
a[0] = 1; a[n_] := a[n] = Module[{b, l}, l = Sort[Range[n] ~Complement~ Divisors[n]]; b[m_, i_] := b[m, i] = If[m == 0, 1, If[i < 1, 0, b[m, i - 1] + If[l[[i]] > m, 0, b[m - l[[i]], i - 1]]]]; b[n, Length[l]]];
Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Feb 06 2017, after Alois P. Heinz *)
PROG
(Haskell)
a200745 n = p [nd | nd <- [1..n], mod n nd /= 0] n where
p _ 0 = 1
p [] _ = 0
p (k:ks) m | m < k = 0 | otherwise = p ks (m - k) + p ks m
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 22 2011
STATUS
approved