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.

This page as a plain text file.
%I A387463 #15 Aug 30 2025 15:56:52
%S A387463 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,
%T A387463 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,
%U A387463 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
%N A387463 Total number of 3's in the decimal digits of the divisors of n.
%H A387463 Robert Israel, <a href="/A387463/b387463.txt">Table of n, a(n) for n = 1..10000</a>
%e A387463 a(33) = 3 because among the divisors of 33, 3 has one 3 and 33 has two, for a total of 3.
%p A387463 f:= proc(n) local t; add(subs(x=1, t)^3, t = expand((1+x+x^2)^n)) end proc:
%p A387463 map(f, [$1..100]);
%t A387463 a[n_]:=Count[Flatten[IntegerDigits/@Divisors[n]],3];Array[a,99] (* _James C. McMahon_, Aug 30 2025 *)
%o A387463 (Python)
%o A387463 from sympy import divisors
%o A387463 def a(n): return sum(str(d).count("3") for d in divisors(n, generator=True))
%o A387463 print([a(n) for n in range(1, 100)]) # _Michael S. Branicky_, Aug 29 2025
%Y A387463 Cf. A385494, A387394, A387464.
%K A387463 nonn,new
%O A387463 1,30
%A A387463 _Robert Israel_, Aug 29 2025