login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Least prime p such that p + k! is prime for all k = 2..n.
1

%I #34 Jan 30 2020 18:03:53

%S 2,3,5,5,17,107,107,107,107,82954517,82954517,79017245897,79017245897,

%T 1490524895687,13101487760627087

%N Least prime p such that p + k! is prime for all k = 2..n.

%C The function f(k;p) = p+(k+1)! could be called an example of a non-polynomial prime generating function.

%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_782.htm">Puzzle 782. Prime-Generating non-polynomials</a>, The Prime Puzzles & Problems Connection, April 4, 2015.

%o (PARI) a(n)=forprime(p=1,,for(i=2,n,ispseudoprime(p+i!)||next(2));return(p))

%K nonn,more

%O 1,1

%A _M. F. Hasler_, Apr 05 2015

%E a(12)-a(14) from _John Cerkan_, Jul 28 2017

%E Erroneous a(12) deleted and new a(14) from _Khalid Sabry_, Jan 25 2020

%E a(15) from _Giovanni Resta_, Jan 28 2020