login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037153 a(n)=p-n!, where p is the smallest prime > n!+1. 17
2, 3, 5, 5, 7, 7, 11, 23, 17, 11, 17, 29, 67, 19, 43, 23, 31, 37, 89, 29, 31, 31, 97, 131, 41, 59, 47, 67, 223, 107, 127, 79, 37, 97, 61, 131, 311, 43, 97, 53, 61, 97, 71, 47, 239, 101, 233, 53, 83, 61, 271, 53, 71, 223, 71, 149, 107, 283, 293, 271, 769, 131, 271, 67, 193 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Analogous to Fortunate numbers and like them, the entries appear to be primes. In fact, the first 1200 terms are primes. Are all terms prime?

a(n) is the first (smallest) m such that m > 1 and n!+ m is prime. The second such m is A087202(n). a(n) must be greater than nextprime(n)-1. - Farideh Firoozbakht, Sep 01 2003

Sequence A069941, which counts the primes between n! and n!+n^2, provides numerical evidence that the smallest prime p greater than n!+1 is a prime distance from n!; that is, p-n! is a prime number. For p-n! to be a composite number, p would have to be greater than n!+n^2, which would imply that A069941(n)=0. [From T. D. Noe, Mar 06 2010]

LINKS

Ray, Chandler, Table of n, a(n) for n = 1..1200

Hisanori Mishima, Primes near to factorial, Dec 2008

MATHEMATICA

NextPrime[ n_Integer ] := (k=n+1; While[ !PrimeQ[ k ], k++ ]; Return[ k ]); f[ n_Integer ] := (p = n! + 1; q = NextPrime[ p ]; Return[ q - p + 1 ]); Table[ f[ n ], {n, 1, 75} ] (from Robert G. Wilson v)

PROG

(MAGMA) z:=125; [ p-f where p is NextPrime(f+1) where f is Factorial(n): n in [1..z] ]; (From Klaus Brockhaus, Mar 02 2010)

(Mupad) for n from 1 to 65 do f := n!:a := nextprime(f+2)-f:print(a) end_for; - Zerinvary Lajos, Feb 22 2007

(PARI) a(n)=nextprime(n!)-n! \\ Charles R Greathouse IV, Jul 02 2013

CROSSREFS

Cf. A087202, A005235, A033932.

Sequence in context: A234345 A111060 A082432 * A168065 A077724 A163867

Adjacent sequences:  A037150 A037151 A037152 * A037154 A037155 A037156

KEYWORD

nonn

AUTHOR

Jud McCranie

EXTENSIONS

Edited by N. J. A. Sloane, Mar 06 2010

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified December 22 02:57 EST 2014. Contains 252326 sequences.