The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094802 a(n) = smallest k such that all of 1 through n divides k!. 1
1, 2, 3, 4, 5, 5, 7, 7, 7, 7, 11, 11, 13, 13, 13, 13, 17, 17, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 29, 29, 31, 31, 31, 31, 31, 31, 37, 37, 37, 37, 41, 41, 43, 43, 43, 43, 47, 47, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
It is conjectured that after n=4 the sequence is prime for n prime or the previous prime for n not prime.
LINKS
EXAMPLE
a(6)=5 as 5!=120 which is divisible by 1,2,3,4,5 and 6.
MAPLE
A094802 := proc(n)
local k, nlcm ;
nlcm := A003418(n) ;
for k from 1 do
if modp(k!, nlcm) = 0 then
return k ;
end if;
end do:
end proc:
seq(A094802(n), n=1..30) ; # R. J. Mathar, Nov 15 2019
MATHEMATICA
a[n_] := Module[{k = 1}, While[True, If[AllTrue[Range[n], Divisible[k!, #]&], Return[k]]; k++]];
Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Apr 01 2024 *)
PROG
(PARI) { for (i=1, 60, x=1; for (j=1, i, xf=x!; if (xf%j!=0, x+=1; j=1)); print1(", "x)) }
CROSSREFS
Sequence in context: A319057 A181894 A265535 * A075084 A086593 A073757
KEYWORD
nonn
AUTHOR
Jon Perry, Jun 11 2004
EXTENSIONS
Corrected by T. D. Noe, Nov 02 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 23:22 EDT 2024. Contains 372535 sequences. (Running on oeis4.)