login
Number of partitions of primes into mutual coprimes > 1.
0

%I #9 Oct 06 2021 13:47:39

%S 1,1,2,3,5,6,9,11,18,30,34,56,78,87,125,182,263,279,402,520,565,773,

%T 987,1328,1878,2332,2485,3092,3235,3999,6957,8396,10734,11228,16920,

%U 17703,22237,27589,32577,40187,49227,51427,73453,76998,89430,93452

%N Number of partitions of primes into mutual coprimes > 1.

%C a(n) = A007359(A000040(n)).

%e n=10: A000040(10) = 29 = 27+2 = 26+3 = 25+4 = 24+5 = 23+6 = 22+7

%e = 21+8 = 20+9 = 19+10 = 19+7+3 = 19+5+3+2 = 18+11 = 17+12 = 17+7+5 =

%e 17+7+3+2 = 17+5+4+3 = 16+13 = 15+14 = 15+7+4+3 = 13+11+5 = 13+11+3+2 =

%e 13+9+7 = 13+9+5+2 = 13+7+5+4 = 11+9+7+2 = 11+9+5+4 = 11+8+7+3 = 11+7+6+5 =

%e 9+8+7+5: a(10)=30.

%t b[n_, i_, s_] := b[n, i, s] = Module[{f}, If[n == 0 || i == 1, 1, If[i<2, 0, f = FactorInteger[i][[All, 1]]; b[n, i-1, Select[s, #<i&]] + If[i <= n && f~Intersection~s == {}, b[n-i, i-1, Select[s~Union~f, #<i&]], 0]]]];

%t c[n_] := b[n, n, {}] - b[n-1, n-1, {}];

%t a[n_] := c[Prime[n]];

%t Table[Print[n, " ", a[n]]; a[n]; a[n], {n, 1, 60}] (* _Jean-François Alcover_, Oct 06 2021, after _Alois P. Heinz_ in A007359 *)

%Y Cf. A000040, A007359.

%K nonn

%O 1,3

%A _Reinhard Zumkeller_, Aug 27 2003