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 A145823 #8 Jul 05 2020 14:33:44 %S A145823 4,16,100,196,5476,8836,16900,17956,21316,25600,52900,65536,106276, %T A145823 115600,122500,164836,184900,193600,220900,341056,401956,470596, %U A145823 490000,495616,614656,739600,846400,972196,1110916,1144900,1336336,1464100 %N A145823 Squares of the form p1 - 1 where p1 is a lower twin prime. %C A145823 These numbers are of the form 3n+1. This follows from the fact that a lower twin prime > 3 is of the form 3n+2. If p1 = 3n+1 then the upper twin would be 3n+1+2 = 3k which is not prime for k > 1. 4 is the only square which is a lower twin prime + 1. If a lower twin prime p1 + 1 is a square, then it is of the form 3n+2+1 or 3n. Then 3n = x^2 implies x = 3r for some r. This implies 3n = 9r^2. Now if we subtract 1 we have 9r^2-1 = (3r-1)(3r+1) which is not prime. %F A145823 a(n) = A080149(n)^2. [From _Ray Chandler_, Oct 24 2008] %e A145823 p1=5 is a lower twin prime. 5-1 = 4 is a square. %t A145823 Select[Select[Partition[Prime[Range[112000]],2,1],#[[2]]-#[[1]]==2&][[All,1]]-1,IntegerQ[Sqrt[#]]&] (* _Harvey P. Dale_, Jul 05 2020 *) %o A145823 (PARI) g(n) = for(x=1,n,y=twinl(x)-1;if(issquare(y),print1(y","))) %o A145823 twinl(n) = local(c, x); c=0;x=1;while(c<n,if(ispseudoprime(prime(x)+2),c++); %o A145823 x++;);return(prime(x-1)) %K A145823 nonn %O A145823 1,1 %A A145823 _Cino Hilliard_, Oct 20 2008 %E A145823 Extended by _Ray Chandler_, Oct 24 2008