login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A266147 Number of n-digit primes in which n-1 of the digits are 8's. 9
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The leading digits must be 8's and only the trailing digit can vary.
For n large a(n) is usually zero.
LINKS
Michael De Vlieger and Robert G. Wilson v, Table of n, a(n) for n = 1..1500
EXAMPLE
a(3) = 3 since 881, 883, and 887 are all primes.
MATHEMATICA
d = 8; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
Join[{4}, Table[Count[Table[10FromDigits[PadRight[{}, k, 8]]+n, {n, {1, 3, 7, 9}}], _?PrimeQ], {k, 110}]] (* Harvey P. Dale, Jun 22 2021 *)
PROG
(Python)
from __future__ import division
from sympy import isprime
def A266147(n):
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
CROSSREFS
Sequence in context: A338106 A232462 A266141 * A326046 A231169 A297847
KEYWORD
base,nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)