login

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”).

A157185
a(n) = least prime p such that there are n consecutive even numbers E < 2 sqrt(p) such that E^2-p is prime.
0
2, 13, 41, 83, 83, 167, 227, 227, 2273, 2273, 2273, 5297, 340007, 837077, 837077, 837077, 837077, 837077, 2004917, 2004917, 2004917, 208305767, 208305767
OFFSET
1,1
COMMENTS
Inspired by a puzzle proposed by J. M. Bergot, cf. link.
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.
a(24) > 3*10^9. - Donovan Johnson, Nov 29 2010
LINKS
J. M. Bergot, Puzzle #481: E.E-p=q, in C. Rivera's Prime puzzles, Feb. 2009.
EXAMPLE
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:
[1, 2, 2] since 2^2-2 = 2 is prime
[2, 13, 6] since 4^2-5 = 11 and 6^2-5 = 31 are prime
[3, 41, 12]
[4, 83, 16] is a truncation of the following chain:
[5, 83, 18] since {10,12,14,16,18} squared minus 83 are all prime
[6, 167, 24] since 20^2-83 which is prime is ignored because 20 > 2*sqrt(83)
[7, 227, 28]
[8, 227, 30]
[9, 2237, 64] since E=32,34,36,38,40 are > 2*sqrt(227),
[10, 2273, 66] although they would also yield primes E^2-p for p=227.
[11, 2273, 68]
[12, 5297, 96]
[13, 340007, 690]
[14, 837077, 942]
[15, 837077, 944]
[16, 837077, 946]
[17, 837077, 948]
[18, 837077, 950]
[19, 2004917, 2572]
[20, 2004917, 2574]
[21, 2004917, 2576]
PROG
(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)))}
CROSSREFS
Sequence in context: A361071 A179925 A263980 * A219054 A154354 A138089
KEYWORD
more,nonn
AUTHOR
M. F. Hasler, Mar 02 2009
EXTENSIONS
a(22)-a(23) from Donovan Johnson, Nov 29 2010
STATUS
approved