OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
2145 = 3*5*11*13. Prime factors average is (3 + 5 + 11 + 13)/4 = 8 and 3 + 5 = 8 = 13 - 5, 5 + 3 = 8 = 11 - 3.
MAPLE
with(numtheory): P:=proc(q, h) local a, b, k, n, ok;
for n from 2*3*5*7 to q do if not isprime(n) and issqrfree(n) then a:=ifactors(n)[2];
if nops(a)=h then b:=2*add(a[k][1], k=1..nops(a))/nops(a); ok:=1;
for k from 1 to trunc(nops(a)/2) do if a[k][1]+a[nops(a)-k+1][1]<>b then ok:=0; break; fi; od; if ok=1 then print(n); fi; fi; fi; od; end: P(10^9, 4);
# Alternative:
N:= 10^5: # to get terms <= N
M:= floor(max(fsolve(3*5*(M-5)*(M-3) = N))):
P:= select(isprime, [seq(i, i=3..M/2, 2)]): nP:= nops(P):
Res:= NULL:
for m from 10 by 2 to M do
for ix from 1 to nP-2 do
x:= P[ix];
if x >= m/2 or (x*(m-x))^2 >= N then break fi;
if not isprime(m-x) then next fi;
for iy from ix+1 to nP-1 do
y:= P[iy];
if y >= m/2 or x*(m-x)*y*(m-y) >= N then break fi;
if not isprime(m-y) then next fi;
Res:= Res, x*(m-x)*y*(m-y);
od od od:
sort([Res]); # Robert Israel, May 19 2019
PROG
(PARI) isok(n, nb=4) = {if (issquarefree(n) && (omega(n)==nb), f = factor(n)[, 1]~; avg = vecsum(f)/#f; for (k=1, #f\2, if (f[k] + f[#f-k+1] != 2*avg, return(0)); ); return (1); ); } \\ Michel Marcus, Nov 10 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Nov 08 2017
EXTENSIONS
More terms from Giovanni Resta, Nov 09 2017
STATUS
approved