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.
%I A062341 #47 Oct 27 2023 20:40:49 %S A062341 5,23,41,113,131,311,401,1013,1031,1103,1301,2003,2111,3011,4001, %T A062341 10103,10211,10301,11003,12011,12101,13001,20021,20201,21011,21101, %U A062341 30011,100103,101021,101111,102101,103001,120011,121001,200003,200201,201011,201101,202001 %N A062341 Primes whose sum of digits is 5. %H A062341 Alois P. Heinz, <a href="/A062341/b062341.txt">Table of n, a(n) for n = 1..14312</a> (first 100 terms from Harvey P. Dale) %F A062341 Intersection of A000040 (primes) with A052219 (digit sum 5). - _M. F. Hasler_, Mar 09 2022 %e A062341 1301 belongs to the sequence since it is a prime with sum of digits = 5. %p A062341 T:= n-> `if`(n=1, 5, sort(select(isprime, [seq(seq(seq( %p A062341 10^(n-1)+1+10^i+10^j+10^k, k=1..j), j=1..i), i=1..n-1), %p A062341 seq(10^(n-1)+3+10^i, i=1..n-1)]))[]): %p A062341 seq(T(n), n=1..8); # _Alois P. Heinz_, Dec 28 2015 %t A062341 Select[Prime[Range[20000]],Total[IntegerDigits[#]]==5&] (* _Harvey P. Dale_, Nov 24 2013 *) %o A062341 (Magma) [p: p in PrimesUpTo(250000) | &+Intseq(p) eq 5]; // _Vincenzo Librandi_, Jul 08 2014 %o A062341 (Python) %o A062341 from sympy import primerange as primes %o A062341 def ok(p): return sum(map(int, str(p))) == 5 %o A062341 print(list(filter(ok, primes(1, 202002)))) # _Michael S. Branicky_, May 23 2021 %o A062341 (PARI) %o A062341 \\ From _M. F. Hasler_, Mar 09 2022: (Start) %o A062341 select( {is_A062341(p,s=5)=sumdigits(p)==s&&isprime(p)}, primes([1,10^6])) \\ 2nd optional parameter for similar sequences with other digit sums. %o A062341 A062341_upto_length(L,s=5,a=List(),u=[10^k|k<-[0..L-1]])={forvec(d=[[1,L]|i<-[1..s]], isprime(p=vecsum(vecextract(u,d))) && listput(a,p),1); Set(a)} \\ (End) %Y A062341 Cf. A000040 (primes), A007953 (sum of digits), A052219 (digit sum = 5). %Y A062341 Cf. A062339 (same for digit sum s = 4), A062337 (s = 7), and others listed in A244918 (s = 68). %Y A062341 Subsequence of A062340 (primes with sum of digits divisible by 5). %K A062341 nonn,base,easy %O A062341 1,1 %A A062341 _Amarnath Murthy_, Jun 21 2001 %E A062341 Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jul 06 2001