OFFSET
1,3
COMMENTS
Let p_n# = A002110(n) be the n-th primorial, and let t be a totative of p_n#, i.e., gcd(t, p_n#) = 1. Let q be the smallest prime totative of p_n#. We know q must be p_(n+1) by the definition of "primorial" as the product of the smallest n primes. This is the starting point of the range of primes we are considering. The ending point is the smallest composite totative, which is a square semiprime. This semiprime in fact must be q^2, since q is the smallest prime totative of p_n#. Stated in terms of prime n, the range we are considering are primes p_(n+1) <= t <= prevprime((p_(n+1))^2). For the smallest primorials, q^2 > p_n# with n <= 3. Thus a(n) < A054272(n) for n <= 3.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = pi(min(prime(n+1)^2, Product_{k=1..n} ( prime(k) ) )) - n.
EXAMPLE
a(2) = pi(min(prime(3)^2, p_2#)) - 2 = pi(min(25,6)) - 2 = 3 - 2 = 1.
a(4) = pi(min(prime(5)^2, p_4#)) - 4 = pi(min(121,210)) - 4 = 30 - 4 = 26.
MATHEMATICA
Table[PrimePi[Min[Prime[n + 1]^2, Product[Prime@ i, {i, n}]]] - n, {n, 49}] (* Michael De Vlieger, May 16 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jamie Morken and Michael De Vlieger, May 15 2017
STATUS
approved