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 A129990 #18 Feb 05 2025 22:07:29 %S A129990 2,3,5,7,11,17,19,23,29,31,41,43,71,79,97,173,179,257,269,311,389,691, %T A129990 4957,8423,11801,14621,25621,26951,38993,75743,102031,191671,668869 %N A129990 Primes p such that the smallest integer whose sum of decimal digits is p is prime. %F A129990 Primes p such that (p mod 9 + 1) * 10^[p/9] - 1 is prime. Therefore the sequence consists of the term 3 and the primes of the forms A002957(k)*9+1, A056703(k)*9+2, A056712(k)*9+4, A056716(k)*9+5, A056721(k)*9+7, A056725(k)*9+8. - _Max Alekseyev_, Nov 09 2009 %e A129990 The smallest integer whose sum of digits is 17 is 89; 89 is prime, therefore 17 is in the sequence. %t A129990 Select[Prime[Range[1000]],PrimeQ[FromDigits[Join[{Mod[ #,9]},Table[9,{i,1,Floor[ #/9]}]]]] &] %o A129990 (Python) %o A129990 from itertools import islice %o A129990 from sympy import isprime, nextprime %o A129990 def A051885(n): return ((n%9)+1)*10**(n//9)-1 # from _Chai Wah Wu_ %o A129990 def agen(startp=2): %o A129990 p = startp %o A129990 while True: %o A129990 if isprime(A051885(p)): yield p %o A129990 p = nextprime(p) %o A129990 print(list(islice(agen(), 23))) # _Michael S. Branicky_, Jul 27 2022 %o A129990 (Sage) sorted( filter(is_prime, sum(([9*t+k for t in oeis(seq).first_terms()] for seq,k in (('A002957',1), ('A056703',2), ('A056712',4), ('A056716',5), ('A056721',7), ('A056725',8))), [3])) ) # _Max Alekseyev_, Feb 05 2025 %Y A129990 Cf. A051885. %Y A129990 Cf. A002957, A056703, A056712, A056716, A056721, A056725. %K A129990 hard,more,nonn,base %O A129990 1,1 %A A129990 _J. M. Bergot_, Jun 14 2007 %E A129990 Edited, corrected and extended by _Stefan Steinerberger_, Jun 23 2007 %E A129990 Extended by _D. S. McNeil_, Mar 20 2009 %E A129990 a(29)-a(33) from _Max Alekseyev_, Nov 09 2009