login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
2,1
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
# Eric M. Schmidt, Jun 27 2015
CROSSREFS
Cf. A045884.
Sequence in context: A360828 A209938 A165953 * A019118 A019126 A019206
KEYWORD
easy,nonn,base
AUTHOR
Author's name lost.
EXTENSIONS
Definition corrected by and more terms from Eric M. Schmidt, Jun 27 2015
STATUS
approved