A165502 Primes p where the digital sum of p^2 is equal to 31.
83, 137, 173, 223, 263, 277, 281, 367, 443, 457, 547, 587, 673, 677, 691, 727, 853, 857, 907, 911, 997, 1033, 1087, 1109, 1163, 1181, 1213, 1217, 1307, 1433, 1447, 1523, 1613, 1627, 1699, 1721, 1811, 2027, 2153, 2203, 2221, 2297, 2347, 2459, 2473, 2477, 2531, 2549
Offset: 1
Examples
83 is in the sequence because 83^2=6889 and 6+8+8+9=31. 1721 is in the sequence because 1721^2=2961841 and 2+9+6+1+8+4+1=31.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[p: p in PrimesUpTo(2600) | &+Intseq(p^2) eq 31]; // Vincenzo Librandi, Sep 12 2013
-
Maple
A007953 := proc(n) add(d,d=convert(n,base,10)) ; end: A123157 := proc(n) A007953((ithprime(n))^2) ; end: for n from 1 to 10000 do if A123157(n) = 31 then printf("%d,",ithprime(n)) ; fi; od: # R. J. Mathar, Sep 29 2009
-
Mathematica
Select[Prime[Range[500]], Total[IntegerDigits[#^2]]== 31 &] (* Harvey P. Dale, Apr 13 2011 *)
Formula
Extensions
Edited by R. J. Mathar, Sep 29 2009