OFFSET
1,3
COMMENTS
Number n is in the sequence, if and only if pi(n) = 2*pi(n/2), where pi(x) is the number of primes<=x. Indeed, all primes from interval (n/2, n] appear in prime power factorization of n! with exponent 1, while all primes from interval (0, n/2] appear in n! with exponents >1. However, it follows from Ehrhart's link that, for n>=22, pi(n) < 2*pi(n/2). Therefore, a(9)=21 is the last term of the sequence.
m is in this sequence if and only if the number of prime divisors of [m/2]! equals the number of unitary prime divisors of m! - Peter Luschny, Apr 29 2014
LINKS
Eugene Ehrhart, On prime numbers, Fibonacci Quarterly 26:3 (1988), pp. 271-274.
EXAMPLE
21! = 2^20*3^9*5^4*7^3*11*13*17*19. Here 4 primes with exponent 1 and 4 primes with exponents >1, so 21 is in the sequence.
MAPLE
with(numtheory): a := proc(n) factorset(n!); factorset(iquo(n, 2)!);
`if`(nops(%% minus %) = nops(%), n, NULL) end: seq(a(n), n=0..30); # Peter Luschny, Apr 28 2014
PROG
(PARI) isok(n) = {f = factor(n!); sum(i=1, #f~, f[i, 2] == 1) == sum(i=1, #f~, f[i, 2] > 1); } \\ Michel Marcus, Apr 20 2014
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Vladimir Shevelev, Apr 20 2014
STATUS
approved