OFFSET
1,1
COMMENTS
The leading digits must be 2's and only the trailing digit can vary.
For n large a(n) is usually zero.
a(n) <= 4. If n > 1 and not a multiple of 3, then a(n) <= 2. It appears that a(n) <= 1 for n > 3. - Chai Wah Wu, Dec 26 2015
LINKS
Dana Jacobsen, Table of n, a(n) for n = 1..10000 (first 1500 terms from Michael De Vlieger and Robert G. Wilson v)
EXAMPLE
a(3) = 3 since 223, 227 and 229 are all primes.
MATHEMATICA
d = 2; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
PROG
(Python)
from sympy import isprime
def A266141(n):
return 4 if n==1 else sum(1 for d in '1379' if isprime(int('2'*(n-1)+d))) # Chai Wah Wu, Dec 26 2015
(Perl) use ntheory ":all"; sub a266141 { my $n=shift; return 4 if $n==1; 0+scalar(grep{is_prime("2"x($n-1).$_)} 1, 3, 7, 9); } say a266141($_) for 1..20; # Dana Jacobsen, Dec 27 2015
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Michael De Vlieger and Robert G. Wilson v, Dec 21 2015
STATUS
approved