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 A360751 #13 Feb 20 2023 12:27:37 %S A360751 4,9,64,-1,144,625,324,2601,-1,154449,260100,1681,898704,27225,114244, %T A360751 -1,278784,223729,4410000,25281,12888100,4730625,1512900,4774225,-1, %U A360751 8208225,6130576,1121481,12744900,34586161,2433600,45360225,9784384,1271279025,64064016,-1,69956496 %N A360751 a(n) is the least perfect square average of two consecutive primes with 2*n gap between them, or -1 if no such number exists. %C A360751 For n > 1, no prime gap that is twice a square can have a perfect square in its middle as the average of the two consecutive primes with that gap between them. It is because then the lesser of the candidate consecutive primes could be factored into a composite of two integers greater than 1, by the algebraic identity a^2 - b^2 = (a - b)*(a + b). %e A360751 a(3) = 64 is a term because 64 = 8^2, a perfect square, which is the least such number that is the average of two consecutive primes 61 and 67, with 2*3 = 6 being the prime gap between them. %t A360751 seq[len_, pmax_] := Module[{s = Table[0, {len}], p = 3, c = 0, q, m, d}, Do[s[[i^2]] = -1; c++, {i, 2, Floor[Sqrt[len]]}]; While[c < len && p < pmax, q = NextPrime[p]; d = (q - p)/2; m = (p + q)/2; If[d <= len && s[[d]] == 0 && IntegerQ[Sqrt[m]], c++; s[[d]] = m]; p = q]; s]; seq[20, 10^7] (* _Amiram Eldar_, Feb 19 2023 *) %o A360751 (PARI) a(n) = if ((n>1) && issquare(n), return(-1)); forprime(p=2, oo, my(q=nextprime(p+1), s); if ((q-p == 2*n) && issquare(s=(p+q)/2), return(s))); \\ _Michel Marcus_, Feb 20 2023 %Y A360751 Cf. A000040, A024675, A000290. %K A360751 sign %O A360751 1,1 %A A360751 _Tamas Sandor Nagy_, Feb 19 2023 %E A360751 More terms from _Amiram Eldar_, Feb 19 2023