login
Largest prime of which the square still does not exceed the product of first n primes, the n-th primorial.
1

%I #13 Aug 29 2019 05:26:34

%S 2,5,13,47,173,709,3109,14929,80429,447829,2724079,17442769,114379879,

%T 784149077,5708691479,43849291271,342473913367,2803269796331,

%U 23620771158583,201815957246317,1793779464521953,16342108667160251,154171144824008969,1518409682511777919,15259828451149028543

%N Largest prime of which the square still does not exceed the product of first n primes, the n-th primorial.

%F a(n) = Max[p; p^2 < A002110(n)], where p is prime; prime(n+s)^2 = a(n)^2 < Product[prime(1), ..., prime(n)] < prime(n+s+1)^2.

%e For n=2, 3, 4, 5, 7: {2^2, 6, 3^2}, {5^2, 30, 7^2}, {13^2, 210, 17^2}, {47^2, 2310, 53^2} {709^2, 510510, 719^2} or {4, 6, 9}, {25, 30, 49}, {169, 210, 289}, {2209, 2310, 2809}, {502681, 510510, 516961}.

%e Also, if n=2, then a(2) < prime(1)=2, if n=3, then a(3)=prime(3)=5 but for n > 3, a(n) > prime(n+1); e.g., a(6) = prime(40) = prime(6+34) = 173.

%t q[x_] := Apply[Times, Table[Prime[w], {w, 1, x}]] rq[x_] := Floor[Sqrt[q[w]]//N] Table[Prime[PrimePi[a[w]]], {w, 2, 15}]

%o (PARI) primo(n) = prod(i=1, n, prime(i)); \\ A002110

%o a(n) = precprime(sqrtint(primo(n))); \\ _Michel Marcus_, Aug 29 2019

%Y Cf. A002110, A067022.

%K nonn

%O 2,1

%A _Labos Elemer_, Dec 29 2001

%E More terms from _Michel Marcus_, Aug 29 2019