login
A200745
Number of partitions of n into distinct non-divisors of n.
21
1, 0, 0, 0, 0, 1, 0, 2, 1, 2, 2, 6, 1, 9, 5, 6, 5, 20, 4, 28, 7, 19, 24, 55, 6, 51, 45, 49, 27, 136, 16, 180, 50, 117, 143, 146, 28, 403, 242, 260, 68, 668, 91, 852, 246, 260, 649, 1370, 90, 1191, 493, 1110, 634, 2701, 386, 1635, 462, 2160, 2486, 5154, 167
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
Sequence in context: A284002 A093659 A306714 * A067541 A054706 A351082
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 22 2011
STATUS
approved