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.

Showing 1-3 of 3 results.

A387357 a(n) is the first number with a total of exactly n 1's in the decimal digits of its divisors.

Original entry on oeis.org

1, 10, 11, 60, 112, 110, 210, 330, 420, 630, 840, 1008, 1890, 1260, 1680, 2520, 2310, 3360, 5460, 6720, 4620, 5040, 7140, 7560, 11880, 9240, 14040, 10080, 17160, 13860, 17136, 16380, 15120, 18480, 27720, 33264, 21420, 39270, 30240, 36960, 41580, 45360, 42840, 57120, 60060, 71820, 75600, 55440
Offset: 1

Views

Author

Robert Israel, Aug 27 2025

Keywords

Comments

a(n) is the least number k such that A385494(k) = n.

Examples

			a(6) = 110 because of the divisors of 110, 1 and 10 each have one 1, 11 and 110 each have two, for a total of 6, and no smaller number works.
		

Crossrefs

Cf. A385494.

Programs

  • Maple
    f:= proc(n) local t;
       add(numboccur(1, convert(t,base,10)), t = numtheory:-divisors(n))
    end proc:
    N:= 100: # for a(1)..a(N)
    V:= Vector(N): count:= 0:
    for x from 1 do
      v:= f(x);
      if v <= N and V[v] = 0 then V[v]:= x; count:= count+1; if count =  N then break fi fi;
    od:
    convert(V,list);
  • Mathematica
    a[n_]:=Module[{k=1},While[Count[IntegerDigits[Divisors[k]]//Flatten,1]!=n, k++]; k]; Array[a,48] (* Stefano Spezia, Aug 28 2025 *)
  • Python
    from itertools import count, islice
    def f(n): return sum(str(d).count("1") for d in divisors(n, generator=True))
    def agen(): # generator of terms
        n, adict = 1, dict()
        for k in count(1):
            v = f(k)
            if v not in adict:
                adict[v] = k
                while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 50))) # Michael S. Branicky, Aug 27 2025

Formula

A385494(a(n)) = n.

A387394 Total number of 2's in the decimal digits of the divisors of n.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 1, 3, 1, 3, 1, 2, 1, 2, 1, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 3, 0, 3, 0, 2, 0, 3, 0, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 3, 0, 2, 1, 2, 0, 3, 0, 1, 1, 1, 0, 4, 0, 1, 1, 1, 0, 2, 0, 2, 1, 2, 0, 5, 0, 1, 1, 3, 0, 1, 0, 3, 0, 1, 0, 4, 0, 1, 0
Offset: 1

Views

Author

Robert Israel, Aug 28 2025

Keywords

Examples

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

Crossrefs

Programs

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

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
Showing 1-3 of 3 results.