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.

A028842 Numbers whose product of digits is prime.

This page as a plain text file.
%I A028842 #27 Jul 08 2025 18:54:03
%S A028842 2,3,5,7,12,13,15,17,21,31,51,71,112,113,115,117,121,131,151,171,211,
%T A028842 311,511,711,1112,1113,1115,1117,1121,1131,1151,1171,1211,1311,1511,
%U A028842 1711,2111,3111,5111,7111,11112,11113,11115,11117,11121,11131,11151
%N A028842 Numbers whose product of digits is prime.
%H A028842 Vincenzo Librandi, <a href="/A028842/b028842.txt">Table of n, a(n) for n = 1..130</a>
%H A028842 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>
%t A028842 Select[Range[11160], PrimeQ[Times@@IntegerDigits[#]] &] (* _Jayanta Basu_, Jun 02 2013 *)
%o A028842 (Sage) [x for x in range(10^5) if (prod(Integer(x).digits(base=10))) in Primes()] # _Bruno Berselli_, May 05 2014
%o A028842 (Scala) (1 to 10000).filter(n => List(2, 3, 5, 7).contains(n.toString.toCharArray.map(_ - 48).scanRight(1)(_ * _).head)) // _Alonso del Arte_, Apr 14 2020
%o A028842 (PARI) isok(n) = isprime(vecprod(digits(n))); \\ _Michel Marcus_, Apr 17 2020
%o A028842 (PARI) is(n)=my(d=digits(n),p); for(i=1,#d,if(d[i]==1,next); if(isprime(d[i]) && !p, p=1, return(0))); p \\ _Charles R Greathouse IV_, Apr 18 2020
%Y A028842 Cf. A007954, A028843, A028834, A046703 (subsequence of primes).
%K A028842 nonn,base,easy
%O A028842 1,1
%A A028842 _N. J. A. Sloane_
%E A028842 More terms from _Erich Friedman_.
%E A028842 Name edited by _Jianing Song_, Jul 07 2025