OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..10000
EXAMPLE
n=217. Prime factors: 7, 31: min(pi)=7, max(pi)=31. Polynomial: (x-7)*(x-31)=x^2-38*x+217. Integral: x^3/3-19*x^2+217*x. The area from x=7 to x=31 is -2304.
n=53151. Prime factors: 3, 7, 2531: min(pi)=3, max(pi)=2531. Polynomial: (x-7)*(x-349)*(x-409)=x^3-2541*x^2+25331*x-53151. Integral: x^4/4-847*x^3+25331/2*x^2-53151*x. The area from x=3 to x=2531 is - 3392739409920.
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);
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Jan 05 2012
STATUS
approved