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.

A385494 Total number of 1's in the decimal digits of the divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 2, 1, 3, 2, 2, 3, 2, 1, 3, 1, 2, 2, 2, 2, 3, 1, 3, 2, 1, 1, 3, 1, 2, 3, 2, 1, 2, 3, 2, 2, 1, 1, 4, 2, 2, 2, 2, 2, 3, 1, 2, 1, 3, 2, 3, 1, 1, 2, 2, 3, 2, 1, 3, 2, 2, 1, 4, 2, 1, 1, 3, 1, 4, 3, 1, 2, 1, 2, 3, 1, 2, 3, 3
Offset: 1

Views

Author

Robert Israel, Aug 27 2025

Keywords

Examples

			a(11) = 3 because of the divisors of 11, there is one 1 in 1 and two in 11.
a(60) = 4 because of the divisors of 60, there is one 1 in 1, one in 10, one in 12, one in 15 and none in the other divisors.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d; add(numboccur(1, convert(d,base,10)),d=numtheory:-divisors(n)) end proc:
    map(f, [$1..100]);
  • Mathematica
    a[n_]:=Count[IntegerDigits[Divisors[n]]//Flatten,1]; Array[a,100] (* Stefano Spezia, Aug 28 2025 *)
  • PARI
    a(n) = sumdiv(n, d, #select(x->(x==1), digits(d))); \\ Michel Marcus, Aug 28 2025
  • Python
    from sympy import divisors
    def a(n): return sum(str(d).count("1") for d in divisors(n, generator=True))
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Aug 27 2025