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 A012883 #28 Jul 18 2024 04:33:45 %S A012883 1,2,3,5,7,11,13,17,19,23,29,31,37,53,59,71,73,79,113,131,137,139,173, %T A012883 179,191,193,197,199,233,239,293,311,313,317,373,379,593,599,719,733, %U A012883 739,797,1319,1373,1399,1733,1913,1931,1933,1973,1979,1993,1997,1999 %N A012883 Numbers in which every prefix (in base 10) is 1 or a prime. %H A012883 T. D. Noe, <a href="/A012883/b012883.txt">Table of n, a(n) for n=1..147</a> (complete sequence) %t A012883 max = 10^10; truncate[p_] := If[q = Quotient[p, 10]; q == 1 || PrimeQ[q], q, p]; ok[p_] := FixedPoint[truncate, p] < 10; p = 1; cnt = 2; A012883 = Join[{1}, Reap[While[(p = NextPrime[p]) < max, If[ok[p], Print[cnt++, " ", p]; Sow[p]]]][[2, 1]]] (* _Jean-François Alcover_, Nov 23 2015 *) %o A012883 (PARI) for(n=1, 1e4, k=n; while(isprime(n) || n==1, c=n; n=(c-lift(Mod(c, 10)))/10); if(n==0, print1(k, ", ")); n=k) \\ _Altug Alkan_, Nov 23 2015 %Y A012883 Cf. A024770 (every prefix is prime). %K A012883 nonn,fini,full,nice,base %O A012883 1,2 %A A012883 Larry Calmer (larry(AT)wri.com), _Simon Plouffe_ %E A012883 Last term is A094335(10) = 1979339339 (confirmed by _David W. Wilson_ ).