A034690 Sum of digits of all the divisors of n.
1, 3, 4, 7, 6, 12, 8, 15, 13, 9, 3, 19, 5, 15, 15, 22, 9, 30, 11, 15, 14, 9, 6, 33, 13, 15, 22, 29, 12, 27, 5, 27, 12, 18, 21, 46, 11, 24, 20, 27, 6, 33, 8, 21, 33, 18, 12, 52, 21, 21, 18, 26, 9, 48, 18, 48, 26, 27, 15, 42, 8, 15, 32, 37, 21, 36, 14, 36, 24, 36, 9, 69, 11, 24, 34
Offset: 1
Examples
a(15) = 1 + 3 + 5 + (1+5) = 15. - _M. F. Hasler_, Nov 08 2015
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Eric Angelini et al., List the dividers [sic], sum the digits, lost messages reconstructed by _N. J. A. Sloane_, Dec 21 2024
- H. Havermann et al, in reply to E. Angelini, List the dividers, sum the digits, SeqFan list, Nov. 2015. [Broken link]
- Maxwell Schneider and Robert Schneider, Digit sums and generating functions, arXiv:1807.06710 [math.NT], 2018-2020. See (22) p. 6.
Programs
-
Haskell
a034690 = sum . map a007953 . a027750_row -- Reinhard Zumkeller, Jan 20 2014
-
Maple
with(numtheory); read transforms; f:=proc(n) local t1, t2, i; t1:=divisors(n); t2:=0; for i from 1 to nops(t1) do t2:=t2+digsum(t1[i]); od: t2; end; # Alternative: sd:= proc(n) option remember; local k; k:= n mod 10; k + procname((n-k)/10) end proc: for n from 0 to 9 do sd(n):= n od: a:= n -> add(sd(d), d=numtheory:-divisors(n)): map(a, [$1..100]); # Robert Israel, Nov 17 2015
-
Mathematica
Table[Plus @@ Flatten@ IntegerDigits@ Divisors@n, {n, 75}] (* Robert G. Wilson v, Sep 30 2006 *)
-
PARI
vector(100, n, sumdiv(n, d, sumdigits(d))) \\ Michel Marcus, Jun 28 2015
-
PARI
A034690(n)=sumdiv(n,d,sumdigits(d)) \\ For use in other sequences. - M. F. Hasler, Nov 08 2015
-
Python
from sympy import divisors def sd(n): return sum(map(int, str(n))) def a(n): return sum(sd(d) for d in divisors(n)) print([a(n) for n in range(1, 76)]) # Michael S. Branicky, Oct 06 2021
Comments