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-5 of 5 results.

A340549 Smallest integer with exactly n divisors that are repunits.

Original entry on oeis.org

1, 11, 1111, 111111, 11222211, 111111111111, 1111222222221111, 11223344555544332211, 112244668899998866442211, 112357025813567765307519653211, 112244781144780011109977441077442211, 113491945266228931047738906599340328084311, 113378566812907968345622215431647587096554773311
Offset: 1

Views

Author

Bernard Schott, Jan 12 2021

Keywords

Comments

Previous name was: Integers whose number of divisors that are repunits sets a new record. From a(1) up to a(18), the terms of these two sequences are exactly the same.
From Bernard Schott, Jan 13 2022: (Start)
Repunit terms are: R_1, R_2, R_4, R_6, R_12, ... where R_m is A002275(m).
It appears that palindromes occur for n = 1 to 9 only. (End)
The indices of the n repunits that divide a(n) are given by the n-th row of A356184. - Bernard Schott, Sep 13 2022

Examples

			111111 has 4 divisors that are repunits: {1, 11, 111, 111111}; also, 111111 is the smallest integer that has at least 4 repunit divisors, hence 111111 is a term.
The 13 repunit divisors of a(13) are R_1, R_2, R_3, R_4, R_5, R_6, R_7, R_8, R_9, R_10, R_12, R_14 and R_18.
		

Crossrefs

Similar, but with divisors that are: A087997 (palindromes), A355699 (repdigits).

Programs

  • Mathematica
    repQ[n_] := Union @ IntegerDigits[n] == {1}; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = DivisorSum[n, 1 &, repQ[#] &]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[4, 10^7] (* Amiram Eldar, Sep 05 2022 *)
  • PARI
    upto(n) = { l = List(); ulim = n; res = []; reps = vector(logint(n, 10)-1, i, 10^(i+1)\9); for(i = 0, #reps, process(1, i); ); listsort(l, 1); r = 0; for(i = 1, #l, c = f(l[i]); if(c > #res, res = concat(res, vector(c - #res, j, oo)); ); res[c] = min(res[c], l[i]) ); res }
    process(n, i) = { if(n <=ulim, listput(l, n); for(j = i + 1, #reps, c = lcm(n, reps[j]); process(c, j) ) ) }
    f(n) = my(u = logint(n, 10) + 2); 1 + sum(i = 1, u, n % (10^(i+1)\9) == 0) \\ David A. Corneth, Jan 12 2021, Jan 17 2022, Sep 12 2022

Extensions

a(5)-a(13) from David A. Corneth, Jan 12 2021
Definition modified by Bernard Schott, Sep 05 2022

A355771 a(n) is the smallest integer that has exactly n divisors from A333369.

Original entry on oeis.org

1, 3, 9, 15, 45, 105, 195, 315, 945, 900, 1575, 2100, 3900, 6825, 11655, 10500, 6300, 18900, 25200, 35100, 27300, 31500, 44100, 94500, 157500, 107100, 81900, 233100, 220500, 598500, 245700, 333900, 409500, 491400, 900900, 573300, 600600, 1228500, 1669500, 1965600
Offset: 1

Views

Author

Bernard Schott, Jul 17 2022

Keywords

Examples

			15 has 4 divisors: {1, 3, 5, 15} all of which are in A333369 integers, and no smaller number has this property, hence a(4) = 15.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; f[n_] := DivisorSum[n, 1 &, q[#] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[40, 10^7] (* Amiram Eldar, Jul 17 2022 *)
  • PARI
    issimber(m) = my(d=digits(m), s=Set(d)); for (i=1, #s, if (#select(x->(x==s[i]), d) % 2 != (s[i] % 2), return (0))); return (1); \\ A333369
    a(n) = my(k=1); while (sumdiv(k, d, issimber(d)) != n, k++); k; \\ Michel Marcus, Jul 18 2022
    
  • Python
    from sympy import divisors
    from itertools import count, islice
    def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))
    def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    def agen():
        n, adict = 1, dict()
        for k in count(1):
            fk = f(k)
            if fk not in adict: adict[fk] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 29))) # Michael S. Branicky, Jul 23 2022

Extensions

More terms from Amiram Eldar, Jul 17 2022

A355968 a(n) is the smallest number that has exactly n odious divisors (A000069).

Original entry on oeis.org

1, 2, 4, 8, 16, 28, 64, 56, 84, 112, 1024, 168, 4096, 448, 336, 728, 36309, 672, 57057, 1456, 1344, 7168, 105105, 2184, 6384, 24150, 5376, 5208, 405405, 4368, 389025, 11648, 20020, 72618, 10416, 8736, 927675, 114114, 48300, 24024, 855855, 17472, 1426425, 40040
Offset: 1

Views

Author

Bernard Schott, Jul 21 2022

Keywords

Comments

a(n) <= 2^(n-1) with equality for n = 1, 2, 3, 4, 5, 7, 11, 13 up to a(44).

Examples

			a(6) = 28 since 28 has 6 divisors {1, 2, 4, 7, 14, 28} that have all an odd number of 1's in their binary expansion: 1, 10, 100, 111, 1110 and 11100; also, no positive integer smaller than 28 has six divisors that are odious.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := DivisorSum[n, 1 &, OddQ[DigitCount[#, 2, 1]] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[20, 10^6] (* Amiram Eldar, Jul 21 2022 *)
  • PARI
    isod(n) = hammingweight(n) % 2; \\ A000069
    a(n) = my(k=1); while (sumdiv(k, d, isod(d)) != n, k++); k; \\ Michel Marcus, Jul 22 2022
    
  • Python
    from sympy import divisors
    from itertools import count, islice
    def c(n): return bin(n).count("1")&1
    def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    def agen():
        n, adict = 1, dict()
        for k in count(1):
            fk = f(k)
            if fk not in adict: adict[fk] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 36))) # Michael S. Branicky, Jul 25 2022

Extensions

More terms from Amiram Eldar, Jul 21 2022

A356019 a(n) is the smallest number that has exactly n evil divisors (A001969).

Original entry on oeis.org

1, 3, 6, 12, 18, 45, 30, 135, 72, 60, 90, 765, 120, 1575, 270, 180, 600, 3465, 480, 13545, 360, 540, 1530, 10395, 1260, 720, 3150, 1980, 1080, 49725, 1440, 45045, 2520, 3060, 6930, 2160, 3780, 58905, 27090, 6300, 5040, 184275, 4320, 135135, 6120, 7920, 20790, 329175, 7560, 8640
Offset: 0

Views

Author

Bernard Schott, Jul 23 2022

Keywords

Comments

Differs from A327328 since a(7) = 135 while A327328(7) = 105.

Examples

			a(4) = 18 since 18 has six divisors: {1, 2, 3, 6, 9, 18} of which four {3, 6, 9, 18} have an even number of 1's in their binary expansion: 11, 110, 1001 and 10010 respectively; also, no positive integer smaller than 18 has exactly four divisors that are evil.
		

Crossrefs

Programs

  • Maple
    # output in unsorted b-file style
    A356019_list := [seq(0,i=1..1000)] ;
    for n from 1 do
        evd := A356018(n) ;
        if evd < nops(A356019_list) then
            if op(evd+1,A356019_list) <= 0 then
                printf("%d %d\n",evd,n) ;
                A356019_list := subsop(evd+1=n,A356019_list) ;
            end if;
        end if;
    end do:  # R. J. Mathar, Aug 07 2022
  • Mathematica
    f[n_] := DivisorSum[n, 1 &, EvenQ[DigitCount[#, 2, 1]] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[50, 10^6] (* Amiram Eldar, Jul 23 2022 *)
  • Python
    from sympy import divisors
    from itertools import count, islice
    def c(n): return bin(n).count("1")&1 == 0
    def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    def agen():
        n, adict = 0, dict()
        for k in count(1):
            fk = f(k)
            if fk not in adict: adict[fk] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 50))) # Michael S. Branicky, Jul 23 2022

Formula

a(n) <= A356040(n). - David A. Corneth, Jul 26 2022

Extensions

More terms from Amiram Eldar, Jul 23 2022

A355698 a(n) is the number of repdigits divisors of n (A010785).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 3, 2, 5, 1, 3, 3, 4, 1, 5, 1, 4, 3, 4, 1, 6, 2, 2, 3, 4, 1, 5, 1, 4, 4, 2, 3, 6, 1, 2, 2, 5, 1, 5, 1, 6, 4, 2, 1, 6, 2, 3, 2, 3, 1, 5, 4, 5, 2, 2, 1, 6, 1, 2, 4, 4, 2, 8, 1, 3, 2, 4, 1, 7, 1, 2, 3, 3, 4, 4, 1, 5, 3, 2, 1, 6, 2, 2, 2, 8, 1, 6, 2, 3, 2, 2, 2, 6, 1, 3, 6, 4, 1, 4, 1, 4, 4
Offset: 1

Views

Author

Bernard Schott, Jul 14 2022

Keywords

Comments

More than the usual number of terms are displayed in order to show the difference from A087990.
The first 100 terms are the same first 100 terms of A087990, then a(101) = 1 while A087990(101) = 2, because 101 is the smallest palindrome that is not repdigit; the next difference is 121.
Inequalities: 1 <= a(n) <= A087990(n).

Examples

			66 has 8 divisors: {1, 2, 3, 6, 11, 22, 33, 66} that are all repdigits, hence a(66) = 8.
121 has 3 divisors: {1, 11, 121} of which 2 are repdigits: {1, 11}, hence a(121) = 2.
		

Crossrefs

Programs

  • Maple
    isrepdig:= proc(n) nops(convert(convert(n,base,10),set))=1 end proc:
    f:= proc(n) nops(select(isrepdig, numtheory:-divisors(n))) end proc:
    map(f, [$1..200]); # Robert Israel, Aug 07 2024
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Length[Union[IntegerDigits[#]]] == 1 &]; Array[a, 100] (* Amiram Eldar, Jul 14 2022 *)
  • PARI
    a(n) = my(ret=0,u=1); while(u<=n, ret+=sum(d=1,9, n%(u*d)==0); u=10*u+1); ret; \\ Kevin Ryde, Jul 14 2022
    
  • PARI
    isrep(n) = {1==#Set(digits(n))}; \\ A010785
    a(n) = sumdiv(n, d, isrep(d)); \\ Michel Marcus, Jul 15 2022
  • Python
    from sympy import divisors
    def c(n): return len(set(str(n))) == 1
    def a(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    print([a(n) for n in range(1, 105)]) # Michael S. Branicky, Jul 14 2022
    

Formula

Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = (7129/2520) * A065444 = 3.11446261209177581335... . - Amiram Eldar, Apr 17 2025
Showing 1-5 of 5 results.