OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..10000
EXAMPLE
n=1445. Prime factors: 5, 17, 17: min(pi)=5, max(pi)=17. Polynomial: (x-5)*(x-17)^2=x^3-39*x^2+459*x-1445. Integral: x^4/4-13*x^3+459/2*x^2-1445*x. The area from x=5 to x=17 is 1728.
n=999187. Prime factors: 7, 349, 409: min(pi)=7, max(pi)=409. Polynomial: (x-7)*(x-349)*(x-409)=x^3-765*x^2+148047*x-999187. Integral: x^4/4-255*x^3+148047/2*x^2-999187*x. The area from x=7 to x=409 is 1526672988.
MAPLE
with(numtheory);
P:=proc(i)
local a, b, c, d, k, m, m1, m2, n, p;
for k from 1 to i do
a:=ifactors(k)[2]; b:=nops(a); c:=op(a); d:=1;
if b>1 then
m1:=c[1, 1]; m2:=0;
for n from 1 to b do
for m from 1 to c[n][2] do d:=d*(x-c[n][1]); od;
if c[n, 1]<m1 then m1:=c[n, 1]; fi; if c[n, 1]>m2 then m2:=c[n, 1]; fi;
od;
p:=int(d, x=m1..m2); if (trunc(p)=p and p>0) then print(k); fi;
fi;
od;
end:
P(500000);
MATHEMATICA
apiQ[n_]:=Module[{f=Flatten[Table[#[[1]], #[[2]]]&/@FactorInteger[ n]], in}, in = Integrate[Times@@(x-f), {x, f[[1]], f[[-1]]}]; Positive[in] && IntegerQ[ in]]; Select[Range[7000], apiQ] (* Harvey P. Dale, May 27 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Jan 05 2012
STATUS
approved