login
A223035
Prime numbers whose digits squared sum to a square.
2
2, 3, 5, 7, 43, 263, 269, 1153, 1531, 1933, 2063, 2069, 2287, 2609, 3319, 3391, 3511, 3931, 4003, 4441, 4801, 4889, 5113, 5399, 5939, 6029, 6067, 6203, 6469, 6607, 8849, 9133, 9539, 10111, 10177, 10513, 10531, 10771, 11149, 11213, 11273, 11321, 11491, 11503
OFFSET
1,1
LINKS
Christian N. K. Anderson, Table of n, a(n) for n = 1..10000
EXAMPLE
269 is a prime number, and 2^2+6^2+9^2 = 121 = 11^2.
MATHEMATICA
Select[Prime[Range[2000]], IntegerQ[Sqrt[Total[IntegerDigits[#]^2]]] &] (* T. D. Noe, Apr 05 2013 *)
PROG
(R) ssod<-function(i) sum(as.numeric(strsplit(as.character(i), "")[[1]])^2)
issquare<-function(x) as.integer(sqrt(x))==sqrt(x)
x=as.bigz(c()); i=2
while(length(x)<10000) {if(issquare(ssod(i))) x=c(x, i); i=nextprime(i)}
CROSSREFS
Prime numbers from the sequence A175396.
Sequence in context: A092066 A224904 A028981 * A096843 A052016 A171020
KEYWORD
nonn,base
STATUS
approved