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.

A387463 Total number of 3's in the decimal digits of the divisors of n.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 1, 3, 1, 1, 2, 1, 1, 3, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 2, 0, 1, 2, 1, 1, 3, 0, 1, 2, 1, 0, 2, 1, 1, 1, 1, 0, 3, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 1, 3, 0, 0, 2, 0, 0, 3
Offset: 1

Views

Author

Robert Israel, Aug 29 2025

Keywords

Examples

			a(33) = 3 because among the divisors of 33, 3 has one 3 and 33 has two, for a total of 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t; add(subs(x=1, t)^3, t = expand((1+x+x^2)^n)) end proc:
    map(f, [$1..100]);
  • Mathematica
    a[n_]:=Count[Flatten[IntegerDigits/@Divisors[n]],3];Array[a,99] (* James C. McMahon, Aug 30 2025 *)
  • Python
    from sympy import divisors
    def a(n): return sum(str(d).count("3") for d in divisors(n, generator=True))
    print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Aug 29 2025