OFFSET
1,1
FORMULA
Intersection of A000040 (primes) and A273188 (numbers with sum of digits divisible by 8). - M. F. Hasler, Mar 10 2022
EXAMPLE
709 is a prime with sum of digits = 16, hence belongs to the sequence.
MATHEMATICA
Select[Prime[Range[500]], Divisible[Total[IntegerDigits[#]], 8]&] (* Harvey P. Dale, Jun 23 2011 *)
PROG
(Magma) [ p: p in PrimesUpTo(10000) | &+Intseq(p) mod 8 eq 0 ]; // Vincenzo Librandi, Apr 02 2011
(PARI) is(n)= sumdigits(n)%8==0 && isprime(n) \\ Charles R Greathouse IV, Mar 09 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Jun 21 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Jul 06 2001
STATUS
approved