|
|
A266143
|
|
Number of n-digit primes in which n-1 of the digits are 4's.
|
|
9
|
|
|
4, 3, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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 4's and only the trailing digit can vary.
For n large a(n) is usually zero.
|
|
LINKS
|
|
|
EXAMPLE
|
a(3) = 2 since 443 and 449 are primes.
a(4) = 2 since 4441 and 4447 are primes.
|
|
MATHEMATICA
|
d = 4; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
|
|
PROG
|
(Python)
from __future__ import division
from sympy import isprime
return 4 if n==1 else sum(1 for d in [-3, -1, 3, 5] if isprime(4*(10**n-1)//9+d)) # Chai Wah Wu, Dec 27 2015
|
|
CROSSREFS
|
Cf. A265733, A266141, A266142, A266144, A266145, A266146, A266147, A266148, A266149, A099412, A096845, A099413, A099414.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|