login
Greatest primorial less than or equal to n.
8

%I #29 Aug 09 2022 14:17:57

%S 1,2,2,2,2,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,30,30,30,

%T 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,

%U 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30

%N Greatest primorial less than or equal to n.

%H Charles R Greathouse IV, <a href="/A260188/b260188.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = max_{A034386(i) <= n} A034386(i).

%F a(n) >> n/log n. - _Charles R Greathouse IV_, Jul 20 2015

%F Sum_{n>=1} 1/a(n)^2 = A249270. - _Amiram Eldar_, Aug 09 2022

%e a(5) = 2 because 2 is the greatest primorial less than or equal to 5.

%e a(31) = 30 because 30 is the greatest primorial less than or equal to 31.

%t Table[k = 0; While[Times @@ Prime@ Range[k + 1] <= n, k++]; Times @@ Prime@ Range@ k, {n, 120}] (* _Michael De Vlieger_, Aug 30 2016 *)

%o (PARI) a(n)=my(t=1,k); forprime(p=2,, k=t*p; if(k>n, return(t), t=k)) \\ _Charles R Greathouse IV_, Jul 20 2015

%Y Cf. A034386 (primorials), A048764, A249270.

%K nonn

%O 1,2

%A _Jean-Marc Rebert_, Jul 18 2015