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 A165502 #16 Sep 08 2022 08:45:47 %S A165502 83,137,173,223,263,277,281,367,443,457,547,587,673,677,691,727,853, %T A165502 857,907,911,997,1033,1087,1109,1163,1181,1213,1217,1307,1433,1447, %U A165502 1523,1613,1627,1699,1721,1811,2027,2153,2203,2221,2297,2347,2459,2473,2477,2531,2549 %N A165502 Primes p where the digital sum of p^2 is equal to 31. %H A165502 Vincenzo Librandi, <a href="/A165502/b165502.txt">Table of n, a(n) for n = 1..1000</a> %F A165502 {A000040(i) : A123157(i) = 31} [_R. J. Mathar_, Sep 29 2009] %e A165502 83 is in the sequence because 83^2=6889 and 6+8+8+9=31. %e A165502 1721 is in the sequence because 1721^2=2961841 and 2+9+6+1+8+4+1=31. %p A165502 A007953 := proc(n) add(d,d=convert(n,base,10)) ; end: %p A165502 A123157 := proc(n) A007953((ithprime(n))^2) ; end: %p A165502 for n from 1 to 10000 do if A123157(n) = 31 then printf("%d,",ithprime(n)) ; fi; od: # _R. J. Mathar_, Sep 29 2009 %t A165502 Select[Prime[Range[500]], Total[IntegerDigits[#^2]]== 31 &] (* _Harvey P. Dale_, Apr 13 2011 *) %o A165502 (Magma) [p: p in PrimesUpTo(2600) | &+Intseq(p^2) eq 31]; // _Vincenzo Librandi_, Sep 12 2013 %K A165502 nonn,base %O A165502 1,1 %A A165502 _Vincenzo Librandi_, Sep 21 2009 %E A165502 Edited by _R. J. Mathar_, Sep 29 2009