OFFSET
1,2
EXAMPLE
No primes divide 1, so the empty product 1 = a(1).
4290 = 2 * 3 * 5 * 11 * 13 which is divisible by three consecutive primes 2, 3, and 5 so a(4290) = 2 * 3 * 5 = 30. (11 * 13 is larger but a shorter chain.)
PROG
(PARI) a(n)=if(n<4, n, my(f=factor(n)[, 1], runLen=1, runProd=f[1], rLen=1, rProd=f[1]); for(i=2, #f, if(nextprime(f[i-1]+1)==f[i], runProd*=f[i]; runLen++, if(runLen>=rLen, rLen=runLen; rProd=runProd); runLen=1; runProd=f[i])); if(runLen<rLen, rProd, runProd)) \\ Charles R Greathouse IV, Mar 02 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Mar 02 2012
STATUS
approved