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 A062343 #28 May 23 2025 14:29:15 %S A062343 17,53,71,107,233,251,431,503,521,701,1061,1151,1223,1511,1601,2141, %T A062343 2213,2411,3023,3041,3203,3221,4013,4211,5003,5021,6011,6101,7001, %U A062343 10007,10061,10133,10151,10223,10313,10331,10601,11213,11321,11411 %N A062343 Primes whose sum of digits is 8. %H A062343 Alois P. Heinz, <a href="/A062343/b062343.txt">Table of n, a(n) for n = 1..42745</a> (first 500 terms from Vincenzo Librandi) %F A062343 Intersection of A000040 (primes) and A052222 (digit sum 8). - _M. F. Hasler_, Mar 09 2022 %e A062343 1151 belongs to the sequence since it is a prime with sum of digits = 8. %p A062343 A062343 := proc(n) %p A062343 option remember ; %p A062343 local p ; %p A062343 if n = 1 then %p A062343 17; %p A062343 else %p A062343 p := nextprime(procname(n-1)) ; %p A062343 while true do %p A062343 if digsum(p) = 8 then # digsum in oeis.org/transforms.txt %p A062343 return p; %p A062343 else %p A062343 p := nextprime(p) ; %p A062343 end if; %p A062343 end do: %p A062343 end if; %p A062343 end proc: %p A062343 seq(A062343(n),n=1..80) ; # _R. J. Mathar_, May 22 2025 %t A062343 Select[Prime[Range[500000]], Total[IntegerDigits[#]]==8 &] (* _Vincenzo Librandi_, Jul 08 2014 *) %o A062343 (Magma) [p: p in PrimesUpTo(20000) | &+Intseq(p) eq 8]; // _Vincenzo Librandi_, Jul 08 2014 %o A062343 (PARI) select( {is_A062343(p, s=8)=sumdigits(p)==s&&isprime(p)}, primes([1, 12345])) \\ 2nd optional parameter for similar sequences with other digit sums. _M. F. Hasler_, Mar 09 2022 %o A062343 (PARI) {A062343_upto_length(L, s=8, a=List(), u=[10^(L-k)|k<-[1..L]])=forvec(d=[[1, L]|i<-[1..s]], isprime(p=vecsum(vecextract(u, d))) && listput(a, p), 1); Vecrev(a)} \\ _M. F. Hasler_, Mar 09 2022 %Y A062343 Cf. A000040 (primes), A007953 (sum of digits), A052222 (digit sum = 8). %Y A062343 Cf. A062339 (same for digit sum s = 4), A062341 (s = 5), A062337 (s = 7), A107579 (s = 10), and others listed in A244918 (s = 68). %Y A062343 Subsequence of A062342 (primes with digit sum divisible by 8). %K A062343 nonn,base,easy %O A062343 1,1 %A A062343 _Amarnath Murthy_, Jun 21 2001 %E A062343 More terms from Larry Reeves (larryr(AT)acm.org), Jul 06 2001