A382050 a(n) = least positive integer m such that when m*(m+1) is written in base n, it is zeroless and contains every single nonzero digit exactly once, or 0 if no such number exists.
0, 0, 5, 0, 79, 0, 650, 2716, 17846, 0, 277166, 1472993, 8233003, 0, 286485314, 1797613432, 11675780880, 0, 538954048563, 3821844010905, 27824692448867, 0, 1587841473665581, 12417635018180828, 99246128296767625, 0, 6742930364132819544, 57228575814672196977, 494789896551823383745, 0, 38997607084561562847324
Offset: 2
Examples
a(9) = 2716. 2716*2717 = 7379372 which is 14786532 in base 9.
Crossrefs
Cf. A381266.
Programs
-
Python
from itertools import count from math import isqrt from sympy.ntheory import digits def A382050(n): k, l, d = (n*(n-1)>>1)%(n-1), n**(n-1)-(n**(n-1)-1)//(n-1)**2, tuple(range(1,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**2 + n - 1)//((n - 1)**2) 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
Formula
a(n) = 0 if n == 3 (mod 4).
Conjecture: a(n) > 0 if n > 5 and n <> 3 (mod 4).
Comments