login
A034690
Sum of digits of all the divisors of n.
21
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,2
COMMENTS
For first occurrence of k, or 0 if k never appears, see A191000.
The only fixed points are 1 and 15. These are also the only loops of iterations of A034690: see the SeqFan thread "List the divisors...". - M. F. Hasler, Nov 08 2015
The following sequence is composed of numbers n such that the sum of digits of all divisors of n equals 15: 8, 14, 15, 20, 26, 59, 62, ... It actually depicts the positions of number 15 in this sequence: see the SeqFan thread "List the divisors...". - V.J. Pohjola, Nov 09 2015
LINKS
H. Havermann et al, in reply to E. Angelini, List the dividers, sum the digits, SeqFan list, Nov. 2015.
Maxwell Schneider and Robert Schneider, Digit sums and generating functions, arXiv:1807.06710 [math.NT], 2018-2020. See (22) p. 6.
EXAMPLE
a(15) = 1 + 3 + 5 + (1+5) = 15. - M. F. Hasler, Nov 08 2015
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 *)
PROG
(Haskell)
a034690 = sum . map a007953 . a027750_row
-- Reinhard Zumkeller, Jan 20 2014
(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
CROSSREFS
Cf. A093653 (binary equivalent)
Sequence in context: A088000 A284344 A168338 * A069192 A076887 A351395
KEYWORD
base,easy,nonn
STATUS
approved