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 A331045 #9 Jan 12 2020 13:48:46 %S A331045 0,0,2,3,0,5,0,7,0,0,0,11,0,13,0,0,0,17,0,19,2,2,2,2,2,2,2,2,2,2,3,3, %T A331045 3,3,3,3,3,3,3,3,0,41,0,43,0,0,0,47,0,0,5,5,5,5,5,5,5,5,5,5,0,61,0,0, %U A331045 0,0,0,67,0,0,7,7,7,7,7,7,7,7,7,7,0,0,0,83 %N A331045 a(n) is the least prime number of the form floor(n/10^k) for some k >= 0, or 0 if no such prime number exists. %C A331045 In other words, a(n) is the least prime prefix of n, or 0 if every prefix of n is nonprime. %C A331045 This sequence is a variant of A331044. %H A331045 Rémy Sigrist, <a href="/A331045/b331045.txt">Table of n, a(n) for n = 0..10000</a> %F A331045 a(n) <= n with equality iff n = 0 or n belongs to A069090. %F A331045 a(n) >= 0 with equality iff n belongs to A202259. %F A331045 a(n) <= A331044(n). %e A331045 For n = 23: %e A331045 - 2 is a prime number, %e A331045 - hence a(23) = 2. %o A331045 (PARI) a(n, base=10) = my (d=digits(n, base), p=0); for (k=1, #d, if (isprime(p=base*p+d[k]), return (p))); return (0) %Y A331045 Cf. A069090, A202259, A331044. %K A331045 nonn,base %O A331045 0,3 %A A331045 _Rémy Sigrist_, Jan 08 2020