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!)
A245756 Least number k such that (k! + n)/k is prime, or 0 if no such k exists. 4
1, 1, 3, 1, 0, 1, 0, 2, 3, 1, 0, 1, 0, 0, 3, 1, 0, 1, 0, 2, 0, 1, 0, 2, 5, 0, 3, 1, 0, 1, 0, 2, 3, 0, 5, 1, 0, 38, 0, 1, 0, 1, 0, 2, 3, 1, 0, 0, 7, 0, 3, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 3, 0, 5, 1, 0, 4, 0, 1, 0, 1, 0, 74, 0, 0, 0, 1, 0, 2, 3, 1, 0, 2, 5, 0, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

If a(n) = n, then n is in A090660.

a(n) <= n for all n.

a(n) = 1 if and only if n + 1 is prime.

LINKS

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

EXAMPLE

(1! + 3)/1 = 4 is not prime.

(2! + 3)/2 = 5/2 is not prime.

(3! + 3)/3 = 3 is prime. Thus a(3) = 3.

PROG

(PARI)

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

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

CROSSREFS

Cf. A090660.

Sequence in context: A111700 A233316 A060096 * A322512 A152892 A193002

Adjacent sequences:  A245753 A245754 A245755 * A245757 A245758 A245759

KEYWORD

nonn

AUTHOR

Derek Orr, Jul 31 2014

EXTENSIONS

Corrected by Jens Kruse Andersen, Aug 03 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 May 29 10:41 EDT 2020. Contains 334699 sequences. (Running on oeis4.)