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.
%I A371511 #14 Apr 13 2024 23:17:33 %S A371511 3,73,683,8521,123323,2140069,43720693,1012356487,26411157737, %T A371511 749149003087,23459877380431,798411310382011,29471615863458281, %U A371511 1158045600182881261,48851274656431280857,2193475267557861578041,104737172422274885174411,5257403213296398892278377 %N A371511 a(n) is the smallest prime such that its representation in base n contains each of the digits 0,1,...,n-2 at least once and does not contain the digit n-1. %C A371511 Conjecture: for n>3, a(n) has digit sum 2+(n-2)(n-1)/2 if n is of the form 4k+3 and has digit sum 1+(n-2)(n-1)/2 otherwise. %H A371511 Chai Wah Wu, <a href="/A371511/b371511.txt">Table of n, a(n) for n = 3..387</a> %H A371511 Chai Wah Wu, <a href="https://arxiv.org/abs/2403.20304">Pandigital and penholodigital numbers</a>, arXiv:2403.20304 [math.GM], 2024. %F A371511 For n>3, a(n) >= (n^(n-1)-n)/(n-1)^2 + n^(n-1). If n = 4k+3 for k>0, then a(n) >= (n^(n-1)-n)/(n-1)^2 + n^(n-1) + n^(n-3) . %e A371511 The corresponding base-n representations are: %e A371511 n a(n) in base n %e A371511 ------------------------ %e A371511 3 10 %e A371511 4 1021 %e A371511 5 10213 %e A371511 6 103241 %e A371511 7 1022354 %e A371511 8 10123645 %e A371511 9 101236457 %e A371511 10 1012356487 %e A371511 11 10223456798 %e A371511 12 10123459a867 %e A371511 13 1012345678a9b %e A371511 14 1012345678c9ab %e A371511 15 1022345678a9cdb %e A371511 16 10123456789acbed %o A371511 (Python) %o A371511 from math import gcd %o A371511 from sympy import nextprime %o A371511 from sympy.ntheory import digits %o A371511 def A371511(n): %o A371511 m, j = n, 0 %o A371511 if n > 3: %o A371511 for j in range(1,n-1): %o A371511 if gcd((n*(n-1)>>1)+j,n-1) == 1: %o A371511 break %o A371511 if j == 0: %o A371511 for i in range(2,n-1): %o A371511 m = n*m+i %o A371511 elif j == 1: %o A371511 for i in range(1,n-1): %o A371511 m = n*m+i %o A371511 else: %o A371511 for i in range(2,1+j): %o A371511 m = n*m+i %o A371511 for i in range(j,n-1): %o A371511 m = n*m+i %o A371511 m -= 1 %o A371511 while True: %o A371511 s = digits(m:=nextprime(m), n)[1:] %o A371511 if n-1 not in s and len(set(s))==n-1: %o A371511 return m %Y A371511 Cf. A185122, A371194. %K A371511 nonn,base %O A371511 3,1 %A A371511 _Chai Wah Wu_, Apr 10 2024