cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A062340 Primes whose sum of digits is a multiple of 5.

This page as a plain text file.
%I A062340 #25 Sep 08 2022 08:45:03
%S A062340 5,19,23,37,41,73,109,113,127,131,163,181,271,307,311,389,401,433,479,
%T A062340 523,541,569,587,613,631,659,677,811,839,857,929,947,983,997,1009,
%U A062340 1013,1031,1063,1103,1117,1153,1171,1289,1301,1423,1487,1531,1559,1621,1667
%N A062340 Primes whose sum of digits is a multiple of 5.
%H A062340 Harvey P. Dale, <a href="/A062340/b062340.txt">Table of n, a(n) for n = 1..1000</a>
%F A062340 Intersection of A000040 (primes) and A227793 (sum of digits in 5Z). - _M. F. Hasler_, Mar 10 2022
%e A062340 569 is a prime with sum of digits = 20, hence belongs to the sequence.
%t A062340 Select[Prime[Range[300]],Divisible[Total[IntegerDigits[#]],5]&] (* _Harvey P. Dale_, Jul 06 2020 *)
%o A062340 (Magma) [ p: p in PrimesUpTo(10000) | &+Intseq(p) mod 5 eq 0 ]; // _Vincenzo Librandi_, Apr 02 2011
%o A062340 (Python)
%o A062340 from sympy import primerange as primes
%o A062340 def ok(p): return sum(map(int, str(p)))%5 == 0
%o A062340 print(list(filter(ok, primes(1, 1668)))) # _Michael S. Branicky_, May 19 2021
%o A062340 (PARI) select( {is_A062340(n)=sumdigits(n)%5==0&&isprime(n)}, primes([1,2000])) \\ _M. F. Hasler_, Mar 10 2022
%Y A062340 Cf. A007953 (sum of digits), A227793 (sum of digits divisible by 5).
%Y A062340 Has as subsequence A062341 (primes with sum of digits s = 5), A107579 (s = 10), A106760 (s = 20), A106763 (s = 25), A106770 (s = 35), A106773 (s = 40), A106780 (s = 50), A106783 (s = 55), A107619 (s = 65) and A181321 (s = 70).
%Y A062340 Cf. A062340 (equivalent for 8).
%K A062340 nonn,base,easy
%O A062340 1,1
%A A062340 _Amarnath Murthy_, Jun 21 2001
%E A062340 Corrected and extended by _Harvey P. Dale_ and Larry Reeves (larryr(AT)acm.org), Jul 04 2001