login
At least two unordered triples of positive numbers have product n and equal sums.
3

%I #18 May 30 2020 09:19:29

%S 36,40,72,90,96,126,144,168,176,200,225,234,240,252,270,280,288,297,

%T 320,360,396,408,420,432,450,480,504,520,540,546,550,560,576,588,600,

%U 630,648,672,675,690,714,720,735,736,768,780,784,800,816,840,850,855

%N At least two unordered triples of positive numbers have product n and equal sums.

%H Alois P. Heinz, <a href="/A060292/b060292.txt">Table of n, a(n) for n = 1..10000</a> (first 160 terms from Carmine Suriano)

%e 36=6*6*1=9*2*2. 6+6+1=9+2+2. so 36 is in the sequence.

%p N:= 1000: # to get all entries <= N

%p for i from 1 to N do R[i]:= {} od:

%p A:= {}:

%p for a from 1 to floor(N^(1/3)) do

%p for b from a to floor((N/a)^(1/2)) do

%p for c from b to floor(N/(a*b)) do

%p p:= a*b*c;

%p s:= a+b+c;

%p if member(s,R[p]) then A:= A union {p}

%p else R[p]:= R[p] union {s}

%p fi;

%p od od od:

%p A;

%p # if using Maple 11 or earlier, uncomment the next line

%p # sort(convert(A,list)); # _Robert Israel_, Feb 09 2015

%p # second Maple program:

%p b:= proc(n, k, t) option remember; expand(`if`(t=0, `if`(k<n, 0, x^n),

%p add(`if`(d>k, 0, b(n/d, d, t-1)*x^d), d=numtheory[divisors](n))))

%p end:

%p a:= proc(n) option remember; local k; for k from 1+

%p `if`(n=1, 0, a(n-1)) while max(coeffs(b(k$2, 2)))<2 do od; k

%p end:

%p seq(a(n), n=1..50); # _Alois P. Heinz_, May 16 2020

%t b[n_, k_, t_] := b[n, k, t] = Expand[If[t == 0, If[k < n, 0, x^n], Sum[If[d > k, 0, b[n/d, d, t - 1] x^d], {d, Divisors[n]}]]];

%t a[n_] := a[n] = Module[{k}, For[k = 1 + If[n == 1, 0, a[n - 1]], Max[ CoefficientList[b[k, k, 2], x]] < 2, k++]; k];

%t Array[a, 52] (* _Jean-François Alcover_, May 30 2020, after _Alois P. Heinz_ *)

%Y Cf. A060275.

%K easy,nonn

%O 1,1

%A _Naohiro Nomoto_, Mar 24 2001

%E Name changed by _Robert Israel_, Feb 09 2015