A112388 a(n) is the smallest prime p such that p^n contains every digit.
10123457689, 101723, 5437, 2339, 1009, 257, 139, 173, 83, 67, 31, 29, 37, 17, 17, 47, 19, 7, 5, 23, 23, 5, 11, 11, 17, 5, 5, 5, 5, 11, 5, 11, 11, 5, 5, 7, 5, 7, 3, 5, 5, 7, 7, 7, 3, 7, 3, 3, 5, 5, 5, 5, 3, 7, 7, 5, 3, 7, 5, 3, 3, 3, 3, 3, 3, 5, 3, 2, 3, 2, 3, 3, 3, 3, 5, 3, 3, 3, 2, 3, 5, 2
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n) local k; k:= 1: do k:= nextprime(k); if convert(convert(k^n,base,10),set) = {$0..9} then return k fi od end proc: f(1):= 10123457689: map(f, [$1..100]); # Robert Israel, Aug 28 2020
-
Mathematica
f[n_] := Block[{k = 1}, While[ Union@IntegerDigits[ Prime[k]^n] != {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, k++ ]; Prime[k]]; Array[f, 82] (* Robert G. Wilson v, Dec 06 2005 *)
-
Python
from sympy import nextprime def a(n): if n == 1: return 10123457689 p = 2 while not(len(set(str(p**n))) == 10): p = nextprime(p) return p print([a(n) for n in range(1, 83)]) # Michael S. Branicky, Jul 04 2021
Extensions
More terms from Robert G. Wilson v, Dec 06 2005
Comments