A046501 Primes with multiplicative persistence value 1.
11, 13, 17, 19, 23, 31, 41, 61, 71, 101, 103, 107, 109, 113, 131, 151, 181, 191, 211, 241, 307, 311, 313, 331, 401, 409, 421, 503, 509, 601, 607, 701, 709, 809, 811, 907, 911, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087
Offset: 1
Examples
181 -> 1*8*1 = 8; one digit in one step.
Links
- Daniel Mondot, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Multiplicative Persistence
Programs
-
Mathematica
Select[Prime[Range[179]], IntegerLength[Times @@ IntegerDigits[#]] <= 1 &] (* Jayanta Basu, Jun 26 2013 *)
-
PARI
is_A046501(n)={isprime(n) || return; my(P=n%10); while(P & n\=10, (P*=n%10)>9 & return);1} \\ M. F. Hasler, Sep 25 2012
-
Python
from math import prod from sympy import isprime def ok(n): return n > 9 and prod(map(int, str(n))) < 10 and isprime(n) print([k for k in range(1088) if ok(k)]) # Michael S. Branicky, Mar 14 2022
Extensions
Numbers < 10 removed, as they have a multiplicative persistence of 0, by Daniel Mondot, Mar 14 2022
Comments