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 A266147 #17 Jun 22 2021 11:37:59 %S A266147 4,2,3,1,1,1,0,1,2,0,0,1,0,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, %T A266147 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, %U A266147 0,0,1,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 %N A266147 Number of n-digit primes in which n-1 of the digits are 8's. %C A266147 The leading digits must be 8's and only the trailing digit can vary. %C A266147 For n large a(n) is usually zero. %H A266147 Michael De Vlieger and Robert G. Wilson v, <a href="/A266147/b266147.txt">Table of n, a(n) for n = 1..1500</a> %e A266147 a(3) = 3 since 881, 883, and 887 are all primes. %t A266147 d = 8; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100] %t A266147 Join[{4},Table[Count[Table[10FromDigits[PadRight[{},k,8]]+n,{n,{1,3,7,9}}], _?PrimeQ],{k,110}]] (* _Harvey P. Dale_, Jun 22 2021 *) %o A266147 (Python) %o A266147 from __future__ import division %o A266147 from sympy import isprime %o A266147 def A266147(n): %o A266147 return 4 if n==1 else sum(1 for d in [-7,-5,-1,1] if isprime(8*(10**n-1)//9+d)) # _Chai Wah Wu_, Dec 27 2015 %Y A266147 Cf. A265733, A266141, A266142, A266143, A266144, A266145, A266146, A266148, A266149, A099421, A099422, A096846, A096508. %K A266147 base,nonn %O A266147 1,1 %A A266147 _Michael De Vlieger_ and _Robert G. Wilson v_, Dec 21 2015