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 A158571 #11 Apr 03 2023 10:36:11 %S A158571 13,17,31,53,71,103,107,211,233,251,431,503,521,701,1021,1061,1151, %T A158571 1201,1223,1511,1601,2011,2141,2213,2411,3001,3023,3041,3203,3221, %U A158571 4013,4211,5003,5021,6011,6101,7001,10007,10061,10111,10133,10151,10223,10313 %N A158571 Primes whose digit sum is a single-digit nonprime. %C A158571 It is interesting to observe that it is hard to find (I found none) primes whose digit sum is 6. On the contrary, it is easier to find primes whose digit sum is 8. %C A158571 The digit sum 6 does not occur here because a number with digit sum 6 is divisible by 3 and therefore not prime. - _R. J. Mathar_, Mar 26 2009 %H A158571 Robert Israel, <a href="/A158571/b158571.txt">Table of n, a(n) for n = 1..10000</a> %H A158571 Chris Caldwell, <a href="https://t5k.org/lists/small/1000.txt">The First 1,000 Primes</a> %F A158571 Union of A062339 and A062343. - _R. J. Mathar_, Mar 26 2009 %e A158571 1061 is a prime whose digit sum is 8, which is a single-digit nonprime. %p A158571 for i from 1 to 8 do if member(i,[1,3,7]) then S[1,i]:= {i} else S[1,i]:= {} fi od: %p A158571 for d from 2 to 5 do %p A158571 for x from 1 to 8 do %p A158571 S[d,x]:= {}; %p A158571 for y from 0 to x-1 do %p A158571 S[d,x]:= S[d,x] union map(t -> 10^(d-1)*y + t, S[d-1,x-y]) %p A158571 od od od: %p A158571 select(isprime, S[5,4] union S[5,8]); # _Robert Israel_, Apr 14 2021 %Y A158571 Cf. A158217. %K A158571 base,nonn %O A158571 1,1 %A A158571 _Parthasarathy Nambi_, Mar 21 2009 %E A158571 Extended by _R. J. Mathar_, Mar 26 2009