%I
%S 0,1,4,7,8,9,13,19,20,21
%N Numbers n for which in the prime power factorization of n!, the numbers of exponents 1 and >1 are equal.
%C 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.
%C 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
%H Eugene Ehrhart, <a href="http://www.fq.math.ca/Scanned/263/ehrhart.pdf">On prime numbers</a>, Fibonacci Quarterly 26:3 (1988), pp. 271274.
%e 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.
%p with(numtheory): a := proc(n) factorset(n!); factorset(iquo(n,2)!);
%p `if`(nops(%% minus %) = nops(%), n, NULL) end: seq(a(n), n=0..30); # _Peter Luschny_, Apr 28 2014
%o (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
%Y Cf. A056171, A177329, A177333, A177334, A240537, A240588, A240606, A240619, A240620, A240668, A240669, A240670, A240672, A240695, A240751, A240755, A240764, A240905, A240906, A241123, A241124, A241139, A241148, A241289.
%K nonn,fini,full
%O 1,3
%A _Vladimir Shevelev_, Apr 20 2014
