login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A118486
a(n) is the smallest prime occurring in the prime factorization of n! to an odd power.
1
2, 2, 2, 2, 5, 5, 2, 2, 7, 7, 3, 3, 2, 2, 2, 2, 5, 5, 11, 3, 2, 2, 7, 7, 2, 2, 2, 2, 5, 5, 2, 2, 3, 3, 3, 3, 2, 2, 5, 5, 2, 2, 2, 2, 3, 3, 13, 13, 2, 2, 2, 2, 17, 5, 2, 2, 3, 3, 7, 7, 2, 2, 2, 2, 3, 3, 3, 5, 2, 2, 7, 7, 2, 2, 2, 2, 11
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
Sequence in context: A337082 A333505 A177333 * A288026 A141299 A035681
KEYWORD
nonn
AUTHOR
John L. Drost, Jul 21 2007
STATUS
approved