login
A107691
Primes with digital product = 5.
12
5, 151, 1151, 1511, 511111, 1111151, 115111111, 1111115111, 1115111111, 1151111111, 111111111511, 111511111111, 1111151111111, 5111111111111, 111111151111111, 111151111111111, 5111111111111111, 111115111111111111111, 1111111111111111111511
OFFSET
1,1
LINKS
MAPLE
select(isprime, [seq(seq((10^m-1)/9 + 4*10^j, j=0..m-1), m=1..40)]); # Robert Israel, Jan 03 2017
MATHEMATICA
Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[Flatten[{5, Table[1, {n}]} ]]], PrimeQ[ # ] &], {n, 0, 21}]]
Select[Prime[Range[3 10^6]], Times@@IntegerDigits[#] == 5 &] (* Vincenzo Librandi, Jul 27 2016 *)
PROG
(Magma) [p: p in PrimesUpTo(3*10^8) | &*Intseq(p) eq 5]; // Vincenzo Librandi, Jul 27 2016
KEYWORD
base,nonn
AUTHOR
STATUS
approved