cp's OEIS Frontend

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.

A346275 Number of n-digit primes with digital product = 3.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Jul 13 2021

Keywords

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, ...

Examples

			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.
		

References

  • Derek Holton, A Second Step to Mathematical Olympiad Problems, Vol. 7, Mathematical Olympiad Series, World Scientific, 2011, Section 8.14 - 69, page 287.

Crossrefs

Programs

  • Mathematica
    a[n_] := Count[(10^n - 1)/9 + 2*10^Range[0, n - 1], ?PrimeQ]; Array[a, 100] (* _Amiram Eldar, Jul 13 2021 *)
  • 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

Formula

a(3*k+1) = 0 for k > 0.