login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242457 Least number k such that k!/n is prime, or 0 if no such number exists. 2
2, 3, 3, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(n) <= n + 2 for all n > 0.

LINKS

Jens Kruse Andersen, Table of n, a(n) for n = 1..10000

EXAMPLE

a(3) = 3 because 3!/3 = 6/3 = 2, which is prime.

a(4) = 0 because there is no k such that k!/4 is a prime. For all k > 3, k! has 24 as a divisor, so therefore k!/4 has 6 as a divisor and is therefore certainly composite.

MAPLE

N:= 7: # to get all a(n) for n <= N!

A:= Array(1..N!):

for k from 1 to N do

for p in select(isprime, [$2..k]) do

    if A[k!/p] = 0 then A[k!/p]:= k fi

od

od:

seq(A[n], n=1..N!); # Robert Israel, Aug 18 2014

PROG

(PARI)

a(n)=for(k=1, n+2, s=k!/n; if(floor(s)==s, if(ispseudoprime(s), return(k))))

n=1; while(n<100, print1(a(n), ", "); n++)

CROSSREFS

Cf. A242456.

Sequence in context: A075108 A265590 A260208 * A190146 A026932 A087401

Adjacent sequences:  A242454 A242455 A242456 * A242458 A242459 A242460

KEYWORD

nonn

AUTHOR

Derek Orr, Aug 16 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 25 13:01 EDT 2020. Contains 337344 sequences. (Running on oeis4.)