OFFSET
0,2
LINKS
David A. Corneth, Table of n, a(n) for n = 0..2499
EXAMPLE
1 cannot be written in the form m + digsum(m), so a(0) = 1.
2 has divisors 1 and 2, and only 2 is written 2 = 1 + digsum(1), so a(1) = 2.
3 has divisors 1 and 3 that cannot be written in the form m + digsum(m).
4 has divisors 1, 2, 4, but only 2 = 1 + digsum(1) and 4 = 2 + digsum(2), so a(2) = 4.
PROG
(Magma) f:=func<n|exists(c){s:s in [0..n]| n eq s+&+Intseq(s)}>; a:=[]; for n in [0..50] do k:=1; while #[d:d in Divisors(k)|f(d)] ne n do k:=k+1; end while; Append(~a, k); end for; a;
(PARI) is_A003052(n)={for(i=1, min(n\2, 9*#digits(n)), sumdigits(n-i)==i && return); n}
a(n) = my(k=1); while (sumdiv(k, d, !is_A003052(d)) != n, k++); k; \\ Michel Marcus, Dec 13 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, Dec 04 2022
STATUS
approved