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 A118590 #14 Jan 08 2024 06:51:59 %S A118590 3,11,17,23,41,47,71,83,101,107,113,131,167,197,227,233,281,311,317, %T A118590 353,383,401,443,461,467,491,503,617,647,677,743,761,773,827,857,863, %U A118590 881,887,911,941,971,1013,1091,1097,1217,1283,1301,1307,1427,1433,1451,1487 %N A118590 Larger of two consecutive primes whose positive difference is a square. %H A118590 T. D. Noe, <a href="/A118590/b118590.txt">Table of n, a(n) for n = 1..1000</a> %H A118590 <a href="/index/Pri#gaps">Index entries for primes, gaps between</a> %F A118590 Superset of A031935 and A031505. [From _R. J. Mathar_, Aug 08 2008] %e A118590 7 and 11 are consecutive primes. 11-7 = 4 a square, so 11 is the second term in the table. %t A118590 Select[Table[Prime[n], {n, 2, 237}], IntegerQ[Sqrt[# - Prime[PrimePi[# - 1]]]] &] (* _Jayanta Basu_, Apr 23 2013 *) %t A118590 nn = 500; ps = Prime[Range[nn]]; t = {}; Do[If[IntegerQ[Sqrt[ps[[n]] - ps[[n-1]]]], AppendTo[t, ps[[n]]]], {n, 2, nn}]; t (* _T. D. Noe_, Apr 23 2013 *) %t A118590 Prime[#+1]&/@Flatten[Position[Differences[Prime[Range[250]]],_?(IntegerQ[ Sqrt[#]]&)]] (* _Harvey P. Dale_, May 08 2019 *) %o A118590 (PARI) g(n) = for(x=2, n, if(issquare(prime(x)-prime(x-1)), print1(prime(x)","))) %Y A118590 Cf. A031935, A031505, A134117 (gap 6^2), A204670 (gap 8^2), A050434 (gap 10^2), A138198, A161002. %K A118590 easy,nonn %O A118590 1,1 %A A118590 _Cino Hilliard_, May 07 2006