OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
12 is a term because 12+(1^2+2^2) = 17 is a prime.
MAPLE
filter:= proc(n) local t; isprime(n+add(t^2, t=convert(n, base, 10))) end proc:
select(filter, [$1..1000]); # Robert Israel, Jan 30 2021
PROG
(Python)
from sympy import isprime
def ssd(n): return sum(int(d)**2 for d in str(n))
def ok(n): return isprime(n + ssd(n))
def aupto(limit): return [m for m in range(1, limit+1) if ok(m)]
print(aupto(301)) # Michael S. Branicky, Jan 30 2021
(PARI) isok(n) = isprime(n + norml2(digits(n))); \\ Michel Marcus, Jan 31 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Nov 01 2002
STATUS
approved