A160433 a(n) is the least number k such that (k-th prime after n!+1)-n! is not a prime.
2, 2, 3, 7, 8, 15, 8, 18, 16, 19, 12, 20, 11, 8, 11, 6, 12, 23, 24, 15, 31, 21, 27, 15, 16, 26, 25, 17, 17, 29, 20, 27, 27, 30, 23, 16, 28, 23, 25, 29, 15, 24, 19, 36, 36, 39, 15, 36, 24, 44, 35, 29, 27, 25, 36, 22, 37, 31, 32, 41, 29, 55, 27, 45, 29, 59, 34, 37, 24, 49, 25, 40
Offset: 0
Keywords
Examples
a(3)=7: The seven primes following 3!+1=7 are 11,13,17,19,23,29 and 31. Subtracting 3!=6 from each of them gives 5,7,11,13,17,23 and 25. The first six values are prime, while the seventh 25=5^2 is not.
Programs
-
Maple
a:=proc(n) option remember; local k: for k from 1 while isprime((nextprime@@k)(n!+1)-n!) do od: k; end;
Comments