OFFSET
1,3
COMMENTS
Also, the number of unitary prime divisors of n!. A prime divisor of n is unitary iff its exponent is 1 in the prime power factorization of n. In general, gcd(p, n/p) = 1 or p. Here we count the cases when gcd(p, n/p) = 1.
A unitary prime divisor of n! is >= n/2, hence their number is pi(n) - pi(n/2). - Peter Luschny, Mar 13 2011
See also the references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
From Robert G. Wilson v, Mar 20 2017: (Start)
First occurrence of k is at n = A080359(k).
The last occurrence of k is at n = A080360(k).
The number of times k appears is A080362(k). (End)
Lev Schnirelmann proved that for every n, a(n) > (1/log_2(n))*(n/3 - 4*sqrt(n)) - 1 - (3/2)*log_2(n). - Arkadiusz Wesolowski, Nov 03 2017
LINKS
Daniel Forgues, Table of n, a(n) for n=1..100000
Ethan Berkove and Michael Brilleslyper, Subgraphs of Coprime Graphs on Sets of Consecutive Integers, Integers, Vol. 22 (2022), #A47, see p. 8.
FORMULA
a(n) = A056169(n!). - Amiram Eldar, Jul 24 2024
EXAMPLE
10! = 2^8 * 3^2 * 5^2 * 7. The only unitary prime divisor is 7, so a(10) = 1.
MAPLE
A056171 := proc(x)
numtheory[pi](x)-numtheory[pi](floor(x/2)) ;
end proc:
seq(A056171(n), n=1..130) ; # N. J. A. Sloane, Sep 01 2015
A056171 := n -> nops(select(isprime, [$iquo(n, 2)+1..n])):
seq(A056171(i), i=1..98); # Peter Luschny, Mar 13 2011
MATHEMATICA
s=0; Table[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; s, {k, 100}]
Table[PrimePi[n]-PrimePi[Floor[n/2]], {n, 100}] (* Harvey P. Dale, Sep 01 2015 *)
PROG
(PARI) A056171=n->primepi(n)-primepi(n\2) \\ M. F. Hasler, Dec 31 2016
(Python)
from sympy import primepi
[primepi(n) - primepi(n//2) for n in range(1, 151)] # Indranil Ghosh, Mar 22 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Jul 27 2000
EXTENSIONS
Definition simplified by N. J. A. Sloane, Sep 01 2015
STATUS
approved