A224966 Numbers n such that n^2+sum-of-digits(n^2) is prime.
1, 4, 10, 16, 31, 32, 40, 41, 43, 62, 71, 76, 94, 95, 97, 98, 121, 142, 158, 163, 164, 166, 179, 188, 208, 211, 214, 227, 229, 259, 260, 265, 284, 301, 313, 317, 320, 328, 331, 340, 352, 355, 356, 365, 380, 382, 386, 392, 397, 401, 418, 424, 425, 431, 436, 439
Offset: 1
Examples
a(12)=76 because 76^2=5776, and 5776+(5+7+7+6)=5801, which is prime.
Links
- Christian N. K. Anderson, Table of n, a(n) for n = 1..10000
- Christian N. K. Anderson, The Ulam Spiral for the prime numbers derived from this sequence, i.e. a(n)^2+sum of digits(a(n)^2)
Crossrefs
Programs
-
R
library(gmp); digsum<-function(x) sum(as.numeric(unlist(strsplit(as.character(x),split="")))) ans=as.bigz(rep(0,100)); n=1; i=as.bigz(1) while(n<=100) { if(isprime((w=i^2+digsum(i^2)))) ans[(n=n+1)-1]=i i=i+1 }; ans
Comments