Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Aug 27 2023 14:13:32
%S 2,13,41,83,83,167,227,227,2273,2273,2273,5297,340007,837077,837077,
%T 837077,837077,837077,2004917,2004917,2004917,208305767,208305767
%N a(n) = least prime p such that there are n consecutive even numbers E < 2 sqrt(p) such that E^2-p is prime.
%C Inspired by a puzzle proposed by _J. M. Bergot_, cf. link.
%C The limit of 2*sqrt(p) imposed here is somewhat arbitrary, but this seemed the most natural choice. (Note that the E's must be > sqrt(p).) Changing it to 3*sqrt(p) would "reveal" the numbers 5,17 and the fact that p=227 is "good" up to n=13. Beyond a(14) both of these limits yield the same terms.
%C a(24) > 3*10^9. - _Donovan Johnson_, Nov 29 2010
%H J. M. Bergot, <a href="http://www.primepuzzles.net/puzzles/puzz_481.htm">Puzzle #481: E.E-p=q</a>, in C. Rivera's Prime puzzles, Feb. 2009.
%e The following table gives n (length of the run), a(n) (the prime), and the largest of the n consecutive even numbers E[1],...,E[n] such that E[i]^2-p is prime:
%e [1, 2, 2] since 2^2-2 = 2 is prime
%e [2, 13, 6] since 4^2-5 = 11 and 6^2-5 = 31 are prime
%e [3, 41, 12]
%e [4, 83, 16] is a truncation of the following chain:
%e [5, 83, 18] since {10,12,14,16,18} squared minus 83 are all prime
%e [6, 167, 24] since 20^2-83 which is prime is ignored because 20 > 2*sqrt(83)
%e [7, 227, 28]
%e [8, 227, 30]
%e [9, 2237, 64] since E=32,34,36,38,40 are > 2*sqrt(227),
%e [10, 2273, 66] although they would also yield primes E^2-p for p=227.
%e [11, 2273, 68]
%e [12, 5297, 96]
%e [13, 340007, 690]
%e [14, 837077, 942]
%e [15, 837077, 944]
%e [16, 837077, 946]
%e [17, 837077, 948]
%e [18, 837077, 950]
%e [19, 2004917, 2572]
%e [20, 2004917, 2574]
%e [21, 2004917, 2576]
%o (PARI) list_A157185( m=0, p=0, C=2, L=0 )={ until( L=0, forstep( j=(t=sqrt(p=nextprime(p+2)))\2*2+2,C*t\1,2, if(isprime(j^2-p), L++>m & print([m=L,p,j]), L&L=0)))}
%K more,nonn
%O 1,1
%A _M. F. Hasler_, Mar 02 2009
%E a(22)-a(23) from _Donovan Johnson_, Nov 29 2010