This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A339007 #10 Dec 06 2020 08:40:14 %S A339007 24,6,312984,16896,120,734994,10640,10,1946016,150,171864,180,31200, %T A339007 17136,120,84,8976,54,137256,300,231504,66,184,360126,24,5824,2496, %U A339007 224,261696,90,4359344,66,50160,68816,280,864,1524696,570,219336,11520,8487984,126,22704 %N A339007 Least k such that p = k^2 + 1 and q = (k+2n)^2 + 1 are prime numbers with q - p square. %C A339007 4*n*(k + n) is a square. If n is a square, then k + n is also a square. %C A339007 If n is prime, then n divides k. %C A339007 If we add the additional condition that p and q are two consecutive primes of the form m^2 + 1, then we obtain the sequence A339008, with A339008(n) = a(n) for n = 1, 2, 3, 4, 6, 7 and 9. %e A339007 a(1) = 24 because 24^2 + 1 = 577, (24 + 2)^2 + 1 = 677 and 677 - 577 = 10^2 is a square. The other values m such that p = m^2 + 1 and q = (m+2)^2 + 1 are primes with q - p square are 11024, 133224, 156024, 342224, 416024,... %e A339007 a(2) = 6 because 6^2 + 1 = 37, (6 + 4)^2 + 1 = 101 and 101 - 37 = 8^2 is a square. The other values m such that p = m^2 + 1 and q = (m+4)^2 + 1 are primes with q - p square are 16, 126, 1350, 1456, 1566, 2310, 5200,... %p A339007 for n from 1 to 50 do: %p A339007 ii:=0: %p A339007 for k from 2 by 2 to 10^9 while(ii=0) do: %p A339007 p:=k^2+1:q:=(k+2*n)^2 +1: %p A339007 if isprime(p) and isprime(q) and sqrt(q-p)=floor(sqrt(q-p)) %p A339007 then %p A339007 ii:=1:printf(`%d %d \n`,n,k): %p A339007 else %p A339007 fi: %p A339007 od: %p A339007 od: %o A339007 (PARI) a(n) = my(k=1); while (!(isprime(p=k^2+1) && isprime(q=(k+2*n)^2 + 1) && issquare(q-p)), k++); k; \\ _Michel Marcus_, Nov 18 2020 %Y A339007 Cf. A002496, A096012, A193558, A206328, A216330, A339008. %K A339007 nonn %O A339007 1,1 %A A339007 _Michel Lagneau_, Nov 18 2020