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!)
A266620 a(n) = least non-divisor of n!. 2
2, 3, 4, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 67, 67, 67, 67, 67, 67, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
It appears that a(n) = A151800(n) with the exception of n = 3. - Robert Israel, Jan 13 2016
LINKS
FORMULA
a(n) = min_{k >= 1} prime(k)^(1 + v(n!, prime(k))) where v(m, p) is the p-adic order of m. - Robert Israel, Jan 13 2016
a(n) = prime(pi(n) + 1) except for n = 3, in which case the least non-divisor of 3! is 4, not 5. - Alonso del Arte, Sep 23 2017
EXAMPLE
For n = 4 the least non-divisor of 4! = 24 = 2^3 * 3 is 5.
For n = 5 the least non-divisor of 5! = 120 = 2^3 * 3 * 5 is 7.
MAPLE
N:= 100: # to get a(1)..a(N)
m:= 1 + numtheory:-pi(N):
Primes:= [seq(ithprime(i), i=1..m)]:
for i from 1 to m do pindex[Primes[i]]:= i od:
V:= Vector(m):
k:= 0:
for n from 1 to N do
for f in ifactors(n)[2] do
q:= pindex[f[1]];
V[q]:= V[q] + f[2];
k:= max(k, q);
od:
a[n]:= min(seq(Primes[i]^(1+V[i]), i=1..k), Primes[k+1]);
od:
seq(a[n], n=1..N); # Robert Israel, Jan 13 2016
MATHEMATICA
Table[Complement[Range[2n], Divisors[n!]][[1]], {n, 30}] (* Alonso del Arte, Sep 23 2017 *)
Table[Block[{m = n!, k = n + 1}, While[Divisible[m, k], k++]; k], {n, 67}] (* Michael De Vlieger, Sep 23 2017 *)
PROG
(Python)
from sympy import nextprime
def A266620(n): return 4 if n == 3 else nextprime(n) # Chai Wah Wu, Feb 22 2023
CROSSREFS
Sequence in context: A348531 A237824 A227972 * A222415 A022473 A214921
KEYWORD
nonn,easy
AUTHOR
Jeffrey Shallit, Jan 01 2016
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 11 21:29 EDT 2024. Contains 372420 sequences. (Running on oeis4.)