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.

A371631 Primes whose product of nonzero digits divided by the sum of its digits is also prime.

Original entry on oeis.org

167, 257, 523, 541, 617, 761, 1447, 1607, 1861, 2053, 2251, 2503, 2521, 2851, 4051, 5023, 5281, 5821, 6701, 8161, 8521, 10067, 10607, 10861, 11273, 11471, 12713, 13127, 13217, 13721, 14407, 16007, 17123, 17231, 17321, 18061, 20507, 20521, 21247, 21317, 21713, 22051
Offset: 1

Views

Author

Mikk Heidemaa, May 24 2024

Keywords

Comments

No term N can have a "9" digit. [Proof: The sum of the digits of N is not a multiple of 3, but the numerator would be a multiple of 9, and so the number would be a multiple of 9, so not a prime.]

Examples

			167 (prime) is a term because 1*6*7/(1+6+7)=42/14=3 (prime).
		

Crossrefs

Subsequence of A038367.
Equals prime terms of A138566.

Programs

  • Mathematica
    pQ[n_] := Block[{idp = DeleteCases[IntegerDigits[n], 0]}, PrimeQ[Times @@ idp/Total@ idp]]; Cases[Prime@ Range@ PrimePi[10^5], _?pQ]
    Select[Prime[Range[2500]],PrimeQ[Times@@(IntegerDigits[#]/.(0->1))/Total[ IntegerDigits[ #]]]&] (* Harvey P. Dale, Sep 24 2024 *)