OFFSET
1,1
COMMENTS
Primes which are 1 or 4 mod 9. - Charles R Greathouse IV, Sep 04 2014
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) ~ 3n log n. - Charles R Greathouse IV, Sep 04 2014
MAPLE
select(isprime, map(t -> (9*t+1, 9*t+4), [$1..1000])); # Robert Israel, Sep 04 2014
MATHEMATICA
sQ[n_]:=MemberQ[{1, 4, 9}, NestWhile[Total[IntegerDigits[#]]&, n, #>9&]]; Select[Prime[Range[300]], sQ] (* Harvey P. Dale, Dec 06 2012 *)
PROG
(PARI) forprime(p=2, 1000, if(issquare(p%9), print1(p, ", ")))
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Klaus Brockhaus, Dec 28 2002
STATUS
approved