login
A217907
Numbers whose digits squared sum to a semiprime.
2
2, 3, 5, 7, 13, 15, 18, 19, 20, 29, 30, 31, 34, 35, 37, 43, 47, 50, 51, 53, 57, 59, 67, 70, 73, 74, 75, 76, 81, 89, 91, 92, 95, 98, 103, 105, 108, 109, 112, 116, 117, 121, 122, 123, 124, 128, 129, 130, 132, 134, 135, 136, 138, 139, 142, 143, 144, 150, 153, 155
OFFSET
1,1
LINKS
Christian N. K. Anderson, Table of n, a(n) for n = 1..10000
EXAMPLE
135 is in the sequence because 1^2+3^2+5^2=35, and 35=7*5 is a semiprime.
MATHEMATICA
Select[Range[200], PrimeOmega[Total[IntegerDigits[#]^2]]==2&] (* Harvey P. Dale, Nov 26 2022 *)
PROG
(R) sumodsq<-function(i) sum(as.numeric(strsplit(as.character(i), "")[[1]])^2)
sodsq.sp=c(); i=-1
while(length(sodsq.sp)<10000) if(sum(factorize(sumodsq((i=i+1)))[[1]][, 2])==2) sodsq.sp=c(sodsq.sp, i)
CROSSREFS
Sequence in context: A262350 A228891 A168484 * A031344 A004682 A173105
KEYWORD
nonn,base,easy
STATUS
approved