login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A060358
a(n) = largest prime < lcm(1..n).
4
5, 11, 59, 59, 419, 839, 2503, 2503, 27701, 27701, 360337, 360337, 360337, 720703, 12252197, 12252197, 232792559, 232792559, 232792559, 232792559, 5354228879, 5354228879, 26771144371, 26771144371, 80313433159, 80313433159, 2329089562799, 2329089562799
OFFSET
3,1
MAPLE
b:= proc(n) option remember; `if`(n=0, 1, ilcm(n, b(n-1))) end:
a:= n-> prevprime(b(n)):
seq(a(n), n=3..30); # Alois P. Heinz, Feb 17 2024
MATHEMATICA
Table[NextPrime[LCM@@Range[n], -1], {n, 3, 30}] (* Harvey P. Dale, May 28 2014 *)
PROG
(PARI) a(n) = precprime(lcm([1..n])); \\ Michel Marcus, Mar 18 2018
(Python)
from sympy import prevprime, lcm
def A060358(n):
return prevprime(lcm(range(1, n+1))) # Chai Wah Wu, Jan 22 2020
CROSSREFS
Sequence in context: A083860 A141496 A192428 * A091798 A070198 A121934
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 01 2001
STATUS
approved