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 A382055 #17 Mar 17 2025 22:15:22 %S A382055 0,2,6,19,0,420,924,3672,0,78880,431493,2173950,0,71583429,436726936, %T A382055 2750336517,0,120521201887,833996387274,5932255141224,0, %U A382055 324116744376715,2483526997445916,19463766853506024,0,1274294107710603710,10627079743009611713,90335862784009245081,0 %N A382055 a(n) = least positive integer m such that when m*(m+1) is written in base n, it does not contain the digits 0 or n-1 and contains every single digit from 1 to n-2 exactly once, or 0 if no such number exists. %F A382055 a(n) = 0 if n == 3 (mod 4). For a proof of this see A382054 for the proof of a similar result which also holds in this case. %F A382055 Conjecture: a(n) = 0 if and only if n == 3 (mod 4). %e A382055 a(9) = 924. 924*925 = 854700 which is 1542376 in base 9. %o A382055 (Python) %o A382055 from itertools import count %o A382055 from math import isqrt %o A382055 from sympy.ntheory import digits %o A382055 def A382055(n): %o A382055 k, l, d= (n*(n-1)>>1)%(n-1), (-n**(n - 1) + (n - 1)**2*(n**(n - 2)*(1 - n) + n**(n - 1)) + 1)//(n - 1)**2, tuple(range(1,n-1)) %o A382055 clist = [i for i in range(n-1) if i*(i+1)%(n-1)==k] %o A382055 if len(clist) == 0: %o A382055 return 0 %o A382055 s = (-n**2 + n + n**n - (n - 1)**3 - 1)//(n*(n - 1)**2) %o A382055 s = isqrt((s<<2)+1)-1>>1 %o A382055 s += n-1-s%(n-1) %o A382055 if s%(n-1) <= max(clist): %o A382055 s -= n-1 %o A382055 for a in count(s,n-1): %o A382055 if a*(a+1)>l: %o A382055 break %o A382055 for c in clist: %o A382055 m = a+c %o A382055 if m*(m+1)>l: %o A382055 break %o A382055 if tuple(sorted(digits(m*(m+1),n)[1:]))==d: %o A382055 return m %o A382055 return 0 # _Chai Wah Wu_, Mar 17 2025 %Y A382055 Cf. A381266, A382050, A382054. %K A382055 nonn,base %O A382055 3,2 %A A382055 _Chai Wah Wu_, Mar 13 2025