login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A028842 Product of digits of n is a prime. 11
2, 3, 5, 7, 12, 13, 15, 17, 21, 31, 51, 71, 112, 113, 115, 117, 121, 131, 151, 171, 211, 311, 511, 711, 1112, 1113, 1115, 1117, 1121, 1131, 1151, 1171, 1211, 1311, 1511, 1711, 2111, 3111, 5111, 7111, 11112, 11113, 11115, 11117, 11121, 11131, 11151 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..130

Index entries for 10-automatic sequences

MATHEMATICA

Select[Range[11160], PrimeQ[Times@@IntegerDigits[#]] &] (* Jayanta Basu, Jun 02 2013 *)

PROG

(Sage) [x for x in range(10^5) if (prod(Integer(x).digits(base=10))) in Primes()] # Bruno Berselli, May 05 2014

(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

(PARI) isok(n) = isprime(vecprod(digits(n))); \\ Michel Marcus, Apr 17 2020

(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

CROSSREFS

Cf. A007954, A028843, A028834.

Sequence in context: A118950 A092620 A028843 * A260181 A140971 A073689

Adjacent sequences:  A028839 A028840 A028841 * A028843 A028844 A028845

KEYWORD

nonn,base,easy

AUTHOR

N. J. A. Sloane.

EXTENSIONS

More terms from Erich Friedman.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 26 15:17 EDT 2020. Contains 338027 sequences. (Running on oeis4.)