login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A202385 Number of partitions of n into distinct parts having pairwise common factors but no overall common factor. 3

%I #18 Feb 15 2017 07:55:11

%S 1,0,0,0,0,0,1,0,0,0,2,0,2,0,0,0,2,0,2,0,1,0,4,0,3,0,1,0,5,0,8,0,2,0,

%T 5,0,10,0,4,0,13,0,15,0,3,1,13,0,19,0,9,1,24,0,20,2,13,2,29,0,34,2,17,

%U 2,34,1,49,2,21,3,58,2,63,3,20,7,72,2,81,3

%N Number of partitions of n into distinct parts having pairwise common factors but no overall common factor.

%H Alois P. Heinz, <a href="/A202385/b202385.txt">Table of n, a(n) for n = 31..251</a>

%e a(31) = 1: [6,10,15] = [2*3,2*5,3*5].

%e a(37) = 1: [10,12,15] = [2*5,2*2*3,3*5].

%e a(41) = 2: [6,15,20], [6,14,21].

%e a(43) = 2: [6,10,12,15], [10,15,18].

%e a(53) = 4: [6,12,15,20], [15,18,20], [6,12,14,21], [14,18,21].

%e a(55) = 3: [10,12,15,18], [6,10,15,24], [6,21,28].

%p with(numtheory):

%p w:= (m, h)-> mul(`if`(j>=h, 1, j), j=factorset(m)):

%p b:= proc(n, i, g, s) option remember; local j, ok;

%p if n<0 then 0

%p elif n=0 then `if`(g>1, 0, 1)

%p elif i<2 then 0

%p else ok:= evalb(i<=n);

%p for j in s while ok do ok:= igcd(i, j)>1 od;

%p b(n, i-1, g, map(x->w(x, i), s)) +`if`(ok,

%p b(n-i, i-1, igcd(i, g), map(x->w(x, i), {s[], i}) ), 0)

%p fi

%p end:

%p a:= n-> b(n, n, 0, {}):

%p seq(a(n), n=31..100);

%t w[m_, h_] := Product[If[j >= h, 1, j], {j, FactorInteger[m][[All, 1]]}]; b[n_, i_, g_, s_] := b[n, i, g, s] = Module[{j, ok}, Which[n<0, 0, n==0, If[g>1, 0, 1], i<2, 0, True, ok = i <= n; For[j = 1, ok && j <= Length[s], j++, ok = GCD[i, s[[j]]]>1]; b[n, i-1, g, Map[w[#, i]&, s]] + If[ok, b[n-i, i-1, GCD[i, g], Map[w[#, i]&, Union @ Append[s, i]]], 0]]]; a[n_] := b[n, n, 0, {}]; Table[a[n], {n, 31, 100}] (* _Jean-François Alcover_, Feb 15 2017, translated from Maple *)

%Y Cf. A200976, A018783.

%K nonn

%O 31,11

%A _Alois P. Heinz_, Dec 18 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)