%I #20 May 10 2023 10:42:45
%S 13,17,29,46,64,86,105,136,161,200,229,276,309,362,419,460,505,572,
%T 621,694,749,830,889,978,1054,1136,1205,1306,1381,1490,1569,1684,1769,
%U 1892,1999,2112,2205,2342,2441,2584,2689,2840,2949,3106,3269,3386,3505,3678
%N Smallest "inconsummate number" in base n greater than in the previous base.
%H Chai Wah Wu, <a href="/A061381/b061381.txt">Table of n, a(n) for n = 2..226</a>
%t n = 1; Do[ While[k = n; While[ Apply[ Plus, IntegerDigits[k, b] ]*n != k && k < 100n, k += n]; k != 100n, n++ ]; Print[n], {b, 2, 60} ]
%o (Python)
%o from functools import lru_cache
%o from itertools import count, combinations_with_replacement
%o from sympy.ntheory import digits
%o @lru_cache(maxsize=None)
%o def A061381(n):
%o for k in count((0 if n <= 2 else A061381(n-1))+1):
%o for l in count(1):
%o if (n-1)*l*k < n**(l-1):
%o return k
%o for d in combinations_with_replacement(range(n),l):
%o if (s:=sum(d)) > 0 and sorted(digits(s*k,n)[1:]) == list(d):
%o break
%o else:
%o continue
%o break # _Chai Wah Wu_, May 09 2023
%Y Cf. A052491.
%K base,easy,nice,nonn
%O 2,1
%A _Robert G. Wilson v_, Jun 08 2001
|