OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
569 is a prime with sum of digits = 20, hence belongs to the sequence.
MATHEMATICA
Select[Prime[Range[300]], Divisible[Total[IntegerDigits[#]], 5]&] (* Harvey P. Dale, Jul 06 2020 *)
PROG
(Magma) [ p: p in PrimesUpTo(10000) | &+Intseq(p) mod 5 eq 0 ]; // Vincenzo Librandi, Apr 02 2011
(Python)
from sympy import primerange as primes
def ok(p): return sum(map(int, str(p)))%5 == 0
print(list(filter(ok, primes(1, 1668)))) # Michael S. Branicky, May 19 2021
(PARI) select( {is_A062340(n)=sumdigits(n)%5==0&&isprime(n)}, primes([1, 2000])) \\ M. F. Hasler, Mar 10 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Jun 21 2001
EXTENSIONS
Corrected and extended by Harvey P. Dale and Larry Reeves (larryr(AT)acm.org), Jul 04 2001
STATUS
approved