A211111 Number of partitions of n into distinct divisors > 1 of n.
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 6, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 19, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 14, 1
Offset: 0
Keywords
Examples
n=12: the divisors > 1 of 12 are {2,3,4,6,12}, there are exactly two subsets which sum up to 12, namely {12} and {2,4,6}, therefore a(12) = 2; a(13) = #{13} = 1, because 13 is prime, having no other divisor > 1; n=14: the divisors > 1 of 14 are {2,7,14}, {14} is the only subset summing up to 14, therefore a(14) = 1.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000 (terms n=1..1000 from Reinhard Zumkeller)
Programs
-
Haskell
a211111 n = p (tail $ a027750_row n) n where p _ 0 = 1 p [] _ = 0 p (k:ks) m | m < k = 0 | otherwise = p ks (m - k) + p ks m
-
Maple
with(numtheory): a:= proc(n) local b, l; l:= sort([(divisors(n) minus {1})[]]): b:= proc(m, i) option remember; `if`(m=0, 1, `if`(i<1, 0, b(m, i-1)+`if`(l[i]>m, 0, b(m-l[i], i-1)))) end; forget(b): b(n, nops(l)) end: seq(a(n), n=0..100); # Alois P. Heinz, Nov 18 2021
-
Mathematica
a[n_] := Count[IntegerPartitions[n, All, Divisors[n] // Rest], P_ /; Reverse[P] == Union[P]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 18 2021 *)
Extensions
a(0)=1 prepended by Alois P. Heinz, Nov 18 2021
Comments