OFFSET
2,1
COMMENTS
If n is even then a(n) is also the smallest prime factor in the binomial coefficient C(n, n/2).
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 2..10000
EXAMPLE
a(10) = 7 since 10! = 2^8 * 3^4 * 5^2 * 7 * 11.
PROG
(PARI) a(n) = f = factor(n!); for (i=1, #f~, if (f[i, 2] % 2, return (f[i, 1]))); \\ Michel Marcus, Jun 27 2013
(PARI) valp(n, p)=my(s); while(n\=p, s+=n); s
a(n)=forprime(p=2, , if(valp(n, p)%2, return(p))) \\ Charles R Greathouse IV, Jun 27 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
John L. Drost, Jul 21 2007
STATUS
approved