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 A034093 #30 Nov 05 2023 09:04:26 %S A034093 0,0,1,0,1,1,0,2,1,0,0,5,0,0,0,0,2,5,0,4,0,0,0,3,0,1,0,0,1,2,0,4,1,0, %T A034093 1,2,0,2,1,0,0,7,0,4,0,0,0,2,0,2,1,0,1,3,0,1,0,0,0,0,0,3,0,0,0,4,0,2, %U A034093 0,0,0,3,0,1,0,0,1,3,0,1,0,0,1,3,0,3,0,0,1,1,0,1,0,0,0,2,0,3,0,0 %N A034093 Number of near-repunit primes that can be formed from (10^k - 1)/9 by changing just one digit from 1 to 0. %D A034093 C. K. Caldwell and H. Dubner, The near repunits primes, J. Rec. Math., Vol. 27(1), 1995, pp. 35-41. %H A034093 Charles R Greathouse IV, <a href="/A034093/b034093.txt">Table of n, a(n) for n = 1..2000</a> %H A034093 Chris Caldwell, <a href="https://t5k.org/curios/page.php?number_id=169">Below are all of the 12-digit Near-Repunit primes</a>. %H A034093 Chris Caldwell, <a href="https://t5k.org/glossary/page.php?sort=Repunit">Repunits</a>. %e A034093 a(12) = 5 because from (10^12 - 1)/9 = 111111111111, by changing just one digit from 1 to 0, out of the eleven candidates, 111111111101, 111111110111, 111111011111, 111011111111 and 101111111111 are primes. %t A034093 a = {}; Do[ p = IntegerDigits[ (10^n - 1)/9 ]; c = 0; Do[ If[ q = FromDigits[ ReplacePart[p, 0, i]]; PrimeQ[q], c++ ], {i, 2, n} ]; a = Append[a, c], {n, 1, 100} ]; a (* _Robert G. Wilson v_, Nov 19 2001 *) %o A034093 (PARI) a(n)=sum(i=1,n-2,ispseudoprime(10^n\9-10^i)) \\ _Charles R Greathouse IV_, May 01 2012 %o A034093 (Python) %o A034093 from sympy import isprime %o A034093 def a(n): %o A034093 Rn = (10**n-1)//9 %o A034093 return sum(1 for i in range(n-1) if isprime(Rn-10**i)) %o A034093 print([a(n) for n in range(1, 101)]) # _Michael S. Branicky_, Nov 04 2023 %Y A034093 Cf. A004022, A065074, A065083. %K A034093 nonn,base %O A034093 1,8 %A A034093 _Felice Russo_ %E A034093 More terms from _Robert G. Wilson v_, Nov 19 2001 %E A034093 Edited by _N. J. A. Sloane_, Oct 02 2008 at the suggestion of _R. J. Mathar_