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.

A112388 a(n) is the smallest prime p such that p^n contains every digit.

This page as a plain text file.
%I A112388 #23 Aug 05 2024 02:02:23
%S A112388 10123457689,101723,5437,2339,1009,257,139,173,83,67,31,29,37,17,17,
%T A112388 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,
%U A112388 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
%N A112388 a(n) is the smallest prime p such that p^n contains every digit.
%C A112388 Conjecture: a(n)=2 for all n>168. Checked up to n = 20000. - _Robert Israel_, Aug 28 2020
%H A112388 Robert Israel, <a href="/A112388/b112388.txt">Table of n, a(n) for n = 1..10000</a>
%p A112388 f:= proc(n) local k;
%p A112388   k:= 1:
%p A112388   do k:= nextprime(k);
%p A112388     if convert(convert(k^n,base,10),set) = {$0..9} then return k fi
%p A112388   od
%p A112388 end proc:
%p A112388 f(1):= 10123457689:
%p A112388 map(f, [$1..100]); # _Robert Israel_, Aug 28 2020
%t A112388 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 *)
%o A112388 (Python)
%o A112388 from sympy import nextprime
%o A112388 def a(n):
%o A112388     if n == 1: return 10123457689
%o A112388     p = 2
%o A112388     while not(len(set(str(p**n))) == 10): p = nextprime(p)
%o A112388     return p
%o A112388 print([a(n) for n in range(1, 83)]) # _Michael S. Branicky_, Jul 04 2021
%Y A112388 Cf. A020666, A020665, A007377, A137214.
%K A112388 base,nonn
%O A112388 1,1
%A A112388 _Tanya Khovanova_, Dec 05 2005
%E A112388 More terms from _Robert G. Wilson v_, Dec 06 2005