login
A346275
Number of n-digit primes with digital product = 3.
0
1, 2, 3, 0, 3, 3, 0, 4, 4, 0, 5, 2, 0, 1, 0, 0, 1, 2, 0, 3, 1, 0, 2, 1, 0, 0, 1, 0, 4, 3, 0, 0, 1, 0, 4, 3, 0, 1, 6, 0, 0, 4, 0, 2, 1, 0, 2, 6, 0, 2, 2, 0, 5, 3, 0, 4, 3, 0, 3, 1, 0, 1, 3, 0, 1, 4, 0, 0, 2, 0, 3, 4, 0, 4, 1, 0, 2, 4, 0, 3, 2, 0, 1, 6, 0, 2, 3, 0, 3, 4, 0
OFFSET
1,2
COMMENTS
Equivalently: Number of n-digit terms of A107689 that are primes.
This sequence is similar to A346274 where digital product = 7.
a(n) = n if n = 1 or n = 2 or n = 3.
Conjecture: for n >= 4, there is at least one composite number among the n-digit numbers with digital product = 3 <==> a(n) < n for n >= 4 (guess proposed by Derek Holton in reference).
Also a(n) = 0 for n = 15, 26, 32, 68, ...
REFERENCES
Derek Holton, A Second Step to Mathematical Olympiad Problems, Vol. 7, Mathematical Olympiad Series, World Scientific, 2011, Section 8.14 - 69, page 287.
FORMULA
a(3*k+1) = 0 for k > 0.
EXAMPLE
3 is prime, hence a(1) = 1.
13 and 31 are primes, hence a(2) = 2.
11113, 11131, 11311 are primes, but 13111 = 7*1873 and 31111 = 53*587, hence a(5) = 3.
MATHEMATICA
a[n_] := Count[(10^n - 1)/9 + 2*10^Range[0, n - 1], _?PrimeQ]; Array[a, 100] (* Amiram Eldar, Jul 13 2021 *)
PROG
(Python)
from sympy import isprime
def a(n): return sum(isprime(int('1'*(n-1-i)+'3'+'1'*i)) for i in range(n))
print([a(n) for n in range(1, 92)]) # Michael S. Branicky, Jul 13 2021
CROSSREFS
Sequence in context: A193682 A051933 A234963 * A131900 A082116 A079777
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jul 13 2021
STATUS
approved