|
|
A045885
|
|
Largest number m such that in base n, the sum of digits in the divisors of m is m (written in base 10).
|
|
3
|
|
|
6, 6, 4, 9, 16, 30, 28, 10, 15, 14, 36, 1, 27, 30, 16, 120, 1, 42, 1, 34, 64, 54, 88, 240, 1, 66, 1, 140, 1, 360, 32, 58, 45, 112, 1, 240, 1, 102, 234, 280, 63, 114, 50, 420, 1, 86, 1, 216, 176, 270, 1, 1, 1, 198, 1, 672, 264, 68, 1, 840, 1, 174, 64, 122, 117
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
LINKS
|
|
|
EXAMPLE
|
[ Decimal ] divisors of 15 are (1,3,5,15), 1+3+5+1+5=15.
|
|
PROG
|
(Sage)
def a(n) :
res = 1
m = 2
# A crude bound
while (n-1)*(m.exact_log(n) + 2) * (2 * (isqrt(m)+1)) >= m :
if sum(sum(d.digits(n)) for d in divisors(m)) == m :
res = m
m += 1
return res
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
Author's name lost.
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|