login
A185122
a(n) = minimum pandigital prime in base n.
10
2, 11, 283, 3319, 48761, 863231, 17119607, 393474749, 10123457689, 290522736467, 8989787252711, 304978405943587, 11177758345241723, 442074237951168419, 18528729602926047181, 830471669159330267737, 39482554816041508293677, 1990006276023222816118943, 105148064265927977839670339, 5857193485931947477684595711
OFFSET
2,1
COMMENTS
a(n) is the smallest prime whose base-n representation contains all digits (i.e., 0,1,...,n-1) at least once.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 2..386 (terms 2..100 from Per H. Lundow)
Chai Wah Wu, Pandigital and penholodigital numbers, arXiv:2403.20304 [math.GM], 2024. See p. 3.
EXAMPLE
The corresponding base-b representations are:
2 10
3 102
4 10123
5 101234
6 1013425
7 10223465
8 101234567
9 1012346785
10 10123457689
11 1022345689a7
12 101234568a79b
13 10123456789abc
14 10123456789cdab
15 10223456789adbce
...
PROG
(Python)
from math import gcd
from itertools import count
from sympy import nextprime
from sympy.ntheory import digits
def A185122(n):
m = n
j = 0
if n > 3:
for j in range(1, n):
if gcd((n*(n-1)>>1)+j, n-1) == 1:
break
if j == 0:
for i in range(2, n):
m = n*m+i
elif j == 1:
for i in range(1, n):
m = n*m+i
else:
for i in range(2, 1+j):
m = n*m+i
for i in range(j, n):
m = n*m+i
m -= 1
while True:
if len(set(digits(m:=nextprime(m), n)[1:]))==n:
return m # Chai Wah Wu, Mar 12 2024
CROSSREFS
Sequence in context: A102031 A248865 A072386 * A350932 A369947 A198894
KEYWORD
nonn,base
AUTHOR
Per H. Lundow, Jan 16 2012
STATUS
approved