OFFSET
1,2
COMMENTS
This is the sequence of indices of prime numbers in A171613.
The Ulam spiral for this sequence is a near-perfect line y=-x (see links).
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)
EXAMPLE
a(12)=76 because 76^2=5776, and 5776+(5+7+7+6)=5801, which is prime.
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Kevin L. Schwartz and Christian N. K. Anderson, Apr 21 2013
STATUS
approved