OFFSET
3,1
COMMENTS
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.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 3..387
Chai Wah Wu, Pandigital and penholodigital numbers, arXiv:2403.20304 [math.GM], 2024.
FORMULA
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) .
EXAMPLE
The corresponding base-n representations are:
n a(n) in base n
------------------------
3 10
4 1021
5 10213
6 103241
7 1022354
8 10123645
9 101236457
10 1012356487
11 10223456798
12 10123459a867
13 1012345678a9b
14 1012345678c9ab
15 1022345678a9cdb
16 10123456789acbed
PROG
(Python)
from math import gcd
from sympy import nextprime
from sympy.ntheory import digits
def A371511(n):
m, j = n, 0
if n > 3:
for j in range(1, n-1):
if gcd((n*(n-1)>>1)+j, n-1) == 1:
break
if j == 0:
for i in range(2, n-1):
m = n*m+i
elif j == 1:
for i in range(1, n-1):
m = n*m+i
else:
for i in range(2, 1+j):
m = n*m+i
for i in range(j, n-1):
m = n*m+i
m -= 1
while True:
s = digits(m:=nextprime(m), n)[1:]
if n-1 not in s and len(set(s))==n-1:
return m
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Apr 10 2024
STATUS
approved