A191000 Greedy inverse of A034690: the smallest number m such that sum of digits of all divisors of m equals n; a(n) = 0 if no such number exists.
1, 0, 2, 3, 13, 5, 4, 7, 10, 0, 19, 6, 9, 21, 8, 403, 79, 34, 12, 39, 35, 16, 129, 38, 133, 52, 30, 100, 28, 18, 81, 63, 24, 75, 333, 66, 64, 117, 99, 243, 76, 60, 889, 171, 88, 36, 279, 54, 484, 387, 78, 48, 475, 136, 1209, 208, 132, 729, 112, 258, 225, 84, 90, 399, 1396, 162, 741, 796
Offset: 1
Examples
a(5) = 13 because 13 is the smallest number such that sum of digits of all its divisors is equal to 5: 1 + 1 + 3 = 5. a(2) = a(10) = 0 because there is no number such that sum of digits of all its divisors is equal to 2 or 10.
Links
- Michel Marcus, Table of n, a(n) for n = 1..2000
Crossrefs
Cf. A034690.
Programs
-
PARI
sdd(n) = sumdiv(n, d, sumdigits(d)); \\ A034690 a(n) = if ((n==2) || (n==10), return (0)); my(k=1); while (sdd(k) != n, k++); k; \\ Michel Marcus, Oct 06 2021