OFFSET
1,1
COMMENTS
EXAMPLE
59 is a term because 5+9=14, giving (final) iterated sum 1+4=5 and 5 is prime.
MATHEMATICA
Select[ Range[580], PrimeQ[ # ] && PrimeQ[Mod[ #, 9]] &]
Select[Prime[Range[200]], PrimeQ[Mod[#, 9]]&] (* Harvey P. Dale, Aug 20 2017 *)
PROG
(PARI) forprime(p=2, 997, if(isprime(p%9), print1(p, ", ")))
(Python) from sympy import isprime, primerange; [print(p, end = ', ') for p in primerange(2, 570) if isprime(p%9)] # Ya-Ping Lu, Jan 03 2024
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
N. J. A. Sloane, Dec 26 2002
EXTENSIONS
STATUS
approved