|
|
A052491
|
|
Smallest "inconsummate number" in base n: smallest number such that in base n, no number is this multiple of the sum of its digits.
|
|
14
|
|
|
13, 17, 29, 16, 27, 30, 42, 46, 62, 68, 86, 92, 114, 122, 147, 154, 182, 192, 222, 232, 266, 278, 314, 326, 367, 380, 422, 436, 482, 498, 546, 562, 614, 632, 688, 704, 762, 782, 842, 862, 926, 948, 1014, 1036, 1107, 1130, 1202, 1226, 1302, 1328, 1406, 1432
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
LINKS
|
|
|
EXAMPLE
|
|
|
MATHEMATICA
|
Do[n = 1; While[k = n; While[ Apply[ Plus, IntegerDigits[k, b] ]*n != k && k < 100n, k += n ]; k != 100n, n++ ]; Print[n], {b, 2, 54} ]
|
|
PROG
|
(Python)
from itertools import count, combinations_with_replacement
from sympy.ntheory import digits
for k in count(1):
for l in count(1):
if (n-1)*l*k < n**(l-1):
return k
for d in combinations_with_replacement(range(n), l):
if (s:=sum(d)) > 0 and sorted(digits(s*k, n)[1:]) == list(d):
break
else:
continue
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice,easy,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|