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 A282342 #41 Jun 02 2025 12:20:41 %S A282342 0,2,3,13,23,0,43,53,0,73,83,0,139,149,0,277,359,0,379,389,0,499,599, %T A282342 0,997,1889,0,1999,2999,0,4999,6899,0,17989,18899,0,29989,39989,0, %U A282342 49999,59999,0,79999,98999,0,199999,389999,0,598999,599999,0,799999,989999,0,2998999 %N A282342 a(n) is the smallest prime number, with sum of digits equals n and a(n) is greater than previous nonzero terms, except if this is not possible in which case a(n)=0. %C A282342 I conjecture that there are prime numbers for every n, if n is not divisible by 3. %C A282342 Other terms: %C A282342 a(97) = 79999999999; %C A282342 a(98) = 98999999999; %C A282342 a(100) = 298999999999; %C A282342 a(1000) = 299989999999999999999999999999999999999999999999999999999999999999 %C A282342 9999999999999999999999999999999999999999999999. %e A282342 a(23) = 599 because 599 is a prime number greater than a(22) = 499 and the sum of its digits is 5 + 9 + 9 = 23. %e A282342 a(24) = 0 because 24 (mod 3) = 0. %t A282342 a = {1}; Do[If[n != 3 && Divisible[n, 3], AppendTo[a, 0], p = NextPrime@ Max@ a; While[Total@ IntegerDigits@ p != n, p = NextPrime@ p]; AppendTo[a, p]], {n, 2, 57}]; a (* _Michael De Vlieger_, Feb 12 2017 *) %o A282342 (PARI) { %o A282342 print1(0", "2", "); %o A282342 n=3;p=3;sp=3; %o A282342 while(p<1000000, %o A282342 while(sp<>n, %o A282342 p=nextprime(p+1); %o A282342 sp=sumdigits(p); %o A282342 ); %o A282342 print1(p", "); %o A282342 n++;if(n%3==0,n++;print1(0", ")); %o A282342 ) %o A282342 } %Y A282342 Cf. A067180. %K A282342 nonn,base %O A282342 1,2 %A A282342 _Dimitris Valianatos_, Feb 12 2017