login
Number of partitions of n into divisors > 1 of n.
14

%I #19 Jun 30 2015 06:16:01

%S 1,0,1,1,2,1,3,1,4,2,3,1,12,1,3,3,10,1,15,1,16,3,3,1,80,2,3,5,20,1,94,

%T 1,36,3,3,3,280,1,3,3,158,1,154,1,28,25,3,1,1076,2,29,3,32,1,255,3,

%U 262,3,3,1,7026,1,3,32,202,3,321,1,40,3,302,1,12072,1

%N Number of partitions of n into divisors > 1 of n.

%C a(A000040(n)) = 1; a(A002808(n)) > 1;

%C a(A001248(n)) = 2; a(A080257(n)) > 2;

%C a(A006881(n)) = 3; a(A033942(n)) > 3.

%H Alois P. Heinz, <a href="/A211110/b211110.txt">Table of n, a(n) for n = 0..10000</a>

%e a(10) = #{10, 5+5, 2+2+2+2+2} = 3;

%e a(11) = #{11} = 1;

%e a(12) = #{12, 6+6, 6+4+2, 6+3+3, 6+2+2+2, 4+4+4, 4+4+2+2, 4+3+3+2, 4+2+2+2+2, 3+3+3+3, 3+3+2+2+2, 6x2} = 12;

%e a(13) = #{13} = 1;

%e a(14) = #{14, 7+7, 2+2+2+2+2+2+2} = 3;

%e a(15) = #{15, 5+5+5, 3+3+3+3+3} = 3.

%p with(numtheory):

%p a:= proc(n) local b, l; l:= sort([(divisors(n) minus {1})[]]):

%p b:= proc(m, i) option remember; `if`(m=0, 1, `if`(i<1, 0,

%p b(m, i-1)+`if`(l[i]>m, 0, b(m-l[i], i))))

%p end; forget(b):

%p b(n, nops(l))

%p end:

%p seq(a(n), n=0..100); # _Alois P. Heinz_, Feb 05 2014

%t a[n_] := Module[{b, l}, l = Rest[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]]]]; b[n, Length[l]]]; a[0] = 1; Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Jun 30 2015, after _Alois P. Heinz_ *)

%o (Haskell)

%o a211110 n = p (tail $ a027750_row n) n where

%o p _ 0 = 1

%o p [] _ = 0

%o p ks'@(k:ks) m | m < k = 0

%o | otherwise = p ks' (m - k) + p ks m

%o (PARI) isokp(p, n) = {for (k=1, #p, if ((p[k]==1) || (n % p[k]), return (0));); return (1);}

%o a(n) = {my(nb = 0); forpart(p=n, if (isokp(p,n), nb++)); nb;} \\ _Michel Marcus_, Jun 30 2015

%Y Cf. A211111, A018818, A027750.

%Y Cf. A210442.

%K nonn

%O 0,5

%A _Reinhard Zumkeller_, Apr 01 2012