cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A034690 Sum of digits of all the divisors of n.

Original entry on oeis.org

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

Views

Author

Keywords

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

Examples

			a(15) = 1 + 3 + 5 + (1+5) = 15. - _M. F. Hasler_, Nov 08 2015
		

Crossrefs

Cf. A093653 (binary equivalent)

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