OFFSET
2,3
COMMENTS
It appears that for each base of the form 4k+3, no number can be found that satisfies the requirement.
From Chai Wah Wu, Mar 13 2025: (Start)
The above observation is true.
Theorem: if n==3 (mod 4), then a(n) = 0.
Proof: Since n^a == 1 (mod n-1), k == the digit sum of k in base n (mod n-1). Thus for a number k with every digit exactly once, k == n(n-1)/2 (mod n-1).
Suppose n==3 (mod 4), i.e. n=2q+1 for some odd q. Then n(n-1)/2 = 2q^2+q. Since n-1 = 2q, this means that n(n-1)/2 == q (mod n-1). As q is odd, m(m+1) is even and n-1 is even, this implies that m(m+1) <> q (mod n-1) and thus m(m+1) is not a number with every digit exactly once and the proof is complete.
Conjecture: a(n) = 0 if and only if n==3 (mod 4).
(End)
LINKS
FORMULA
a(n) = 0 if n == 3 (mod 4). - Chai Wah Wu, Mar 13 2025
EXAMPLE
1477 is 2705 in octal. 2705 * 2706 = 10247536 (base 8)
38627 * 38628 = 1492083756 (base 10)
see a381266.txt for more
PROG
(Python)
from itertools import count
from math import isqrt
from sympy.ntheory import digits
def A381266(n):
k, l, d = (n*(n-1)>>1)%(n-1), n**n-(n**n-n)//(n-1)**2, tuple(range(n))
clist = [i for i in range(n-1) if i*(i+1)%(n-1)==k]
if len(clist) == 0:
return 0
s = (n**n-n)//(n-1)**2+n**(n-2)*(n-1)-1
s = isqrt((s<<2)+1)-1>>1
s += n-1-s%(n-1)
if s%(n-1) <= max(clist):
s -= n-1
for a in count(s, n-1):
if a*(a+1)>l:
break
for c in clist:
m = a+c
if m*(m+1)>l:
break
if tuple(sorted(digits(m*(m+1), n)[1:]))==d:
return m
return 0 # Chai Wah Wu, Mar 17 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Daniel Mondot and Ali Sada, Feb 18 2025
EXTENSIONS
a(19)-a(29) from Chai Wah Wu, Mar 12 2025
STATUS
approved
