Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Mar 07 2020 05:37:48
%S 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,
%T 66,1,140,1,360,32,58,45,112,1,240,1,102,234,280,63,114,50,420,1,86,1,
%U 216,176,270,1,1,1,198,1,672,264,68,1,840,1,174,64,122,117
%N Largest number m such that in base n, the sum of digits in the divisors of m is m (written in base 10).
%e [ Decimal ] divisors of 15 are (1,3,5,15), 1+3+5+1+5=15.
%o (Sage)
%o def a(n) :
%o res = 1
%o m = 2
%o # A crude bound
%o while (n-1)*(m.exact_log(n) + 2) * (2 * (isqrt(m)+1)) >= m :
%o if sum(sum(d.digits(n)) for d in divisors(m)) == m :
%o res = m
%o m += 1
%o return res
%o # _Eric M. Schmidt_, Jun 27 2015
%Y Cf. A045884.
%K easy,nonn,base
%O 2,1
%A Author's name lost.
%E Definition corrected by and more terms from _Eric M. Schmidt_, Jun 27 2015