A382953 Numbers with at least one factorization for which the factors can be partitioned into 2 or more distinct subsets with equal sums.
16, 30, 48, 54, 64, 70, 72, 84, 96, 120, 126, 128, 144, 160, 162, 180, 192, 198, 210, 216, 240, 243, 250, 252, 256, 264, 270, 280, 286, 288, 300, 308, 320, 324, 330, 336, 360, 378, 384, 390, 396, 400, 420, 432, 440, 448, 462, 468, 480, 486, 495, 504, 510, 512
Offset: 1
Keywords
Examples
a(1) = 16: 2 * 2 * 4 = 16 and 2 + 2 = 4. a(2) = 30: 2 * 3 * 5 = 30 and 2 + 3 = 5. a(3) = 48: 2 * 2 * 2 * 6 = 48 and 2 + 2 + 2 = 6, and also 2 * 4 * 6 = 48 and 2 + 4 = 6. a(5) = 64: 2 * 2 * 2 * 2 * 4 = 64 and 2 + 2 + 2 = 2 + 4. a(39) = 384: 2 * 2 * 2 * 2 * 4 * 6 = 384 and 2 + 2 + 2 = 2 + 4 = 6 (plus 4 other instances).
Programs
-
Mathematica
ok[n_]:=Catch@ Block[{t, d=Divisors@n,f}, f[y_]:=Block[{L={}, r}, r[x_,m_,c_]:= If[x==1, AppendTo[L,c], r[x/#, #, Append[c,#]]& /@ Select[ Divisors@x, #>=m&];]; f[y,2,{}]; L]; Do[t=Plus@@@ s[d[[i]]]; If[d[[i]]^2!=n, Intersection[t, Plus@@@ s[n/d[[i]]]] != {} && Throw@True, Sort@t != Union@t && Throw@True],{i, 2, Ceiling[ Length@d/2]}]; False]; Select[Range@ 512,ok] (* Giovanni Resta, Apr 10 2025 *)
-
PARI
a382953_count(x, f=List())={my(r=x/if(#f, vecprod(Vec(f)), 1)); if(#f && r==1, my(c=0, s=vecsum(Vec(f)), d=divisors(s)); for(i=2, #d, my(z=s/d[i]); if(z
1, next); listput(f, d); c+=a382953_count(x, f); listpop(f)); return(c)} a382953_part(f, z, rvs=0, v=List())={my(c=0); if(#v==#f[2], if(sum(i=1, #v, f[1][i]*v[i])
Comments