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.

A090395 Denominator of d(n)/n, where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

1, 1, 3, 4, 5, 3, 7, 2, 3, 5, 11, 2, 13, 7, 15, 16, 17, 3, 19, 10, 21, 11, 23, 3, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 4, 37, 19, 39, 5, 41, 21, 43, 22, 15, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 7, 57, 29, 59, 5, 61, 31, 21, 64, 65, 33, 67, 34, 69, 35, 71, 6, 73, 37, 25, 38
Offset: 1

Views

Author

Ivan_E_Mayle(AT)a_provider.com, Jan 31 2004

Keywords

Comments

The first occurrence of k (if it exists) is studied in A091895.
Sequence A353011 gives indices of "late birds": n such that a(k) > a(n) for all k > n. - M. F. Hasler, Apr 15 2022

Examples

			a(6) = 3 because the number of divisors of 6 is 4 and 4 divided by 6 equals 2/3, which has 3 as its denominator.
		

Crossrefs

Cf. A000005, A090387 (numerators), A091896 (numbers not in this sequence), A353011 (indices of terms such that all subsequent terms are larger).

Programs

  • Maple
    with(numtheory): seq(denom(tau(n)/n), n=1..75) ; # Zerinvary Lajos, Jun 04 2008
  • Mathematica
    Table[ Denominator[ DivisorSigma[0, n]/n], {n, 1, 80}] (* Robert G. Wilson v, Feb 04 2004 *)
  • PARI
    A090395(n) = denominator(numdiv(n)/n); \\ Antti Karttunen, Sep 25 2018
    
  • Python
    from math import gcd
    from sympy import divisor_count
    def A090395(n): return n//gcd(n,divisor_count(n)) # Chai Wah Wu, Jun 20 2022

Formula

a(n) = n/g with g = A009191(n) = gcd(A000005(n), n). This explains the "rays" in the graph, e.g., g = 1 for odd squarefree n, g = 2 for even semiprimes n = 2p > 4 and n = 4p, p > 3. - M. F. Hasler, Apr 15 2022

Extensions

More terms from Robert G. Wilson v, Feb 04 2004

A348172 a(n) is the number of positive k (can be greater than n) such that A000005(n)/n = A000005(k)/k.

Original entry on oeis.org

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

Views

Author

Tejo Vrush, Oct 04 2021

Keywords

Comments

The first 1 occurs at a(4). The corresponding k value is 4.
The first 2 occurs at a(1). The corresponding k values are 1, 2.
The first 3 occurs at a(9). The corresponding k values are 9, 18, 24.
The first 4 occurs at a(243). The corresponding k values are 243, 405, 486, 810.
Does every number appear in this sequence?
The first 5 is at a(3189375) with k-values {3189375, 5467500, 6378750, 6561000, 8748000} while the first 6 is at 3176523 with k-values {3176523, 4084101, 6353046, 6806835, 8168202, 13613670}. If 7 appears it does so past 10^8. - Charles R Greathouse IV, Oct 05 2021

Examples

			For n = 9, the k such that A000005(9)/9 = 1/3 = A000005(k)/k are 9, 18, and 24. Therefore, a(9) = 3.
		

Crossrefs

Programs

  • Mathematica
    Array[Function[r, Count[Range[Ceiling[4/r^2]], _?(DivisorSigma[0, #]/# == r &)]][DivisorSigma[0, #]/#] &, 105] (* or *)
    Block[{nn = 7, m, s}, m = 2^(2 nn); s = KeySort@ PositionIndex[Array[DivisorSigma[0, #]/# &, m]]; s = Reverse@ KeyDrop[s, TakeWhile[Keys@ s, 4/#^2 > m &]]; Length /@ Array[Lookup[s, DivisorSigma[0, #]/#] &, 2^nn]] (* Michael De Vlieger, Oct 04 2021 *)
  • PARI
    a(n) = {my(q=numdiv(n)/n); sum(i=1, 4/q^2, numdiv(i)/i == q);} \\ Michel Marcus, Oct 04 2021
    
  • PARI
    a(n) = my(q=numdiv(n)/n, s=denominator(q), res = 0); forstep(i=s, 4/q^2, s, if(numdiv(i) == q * i, res++)); res \\ David A. Corneth, Oct 07 2021
    
  • PARI
    \\ See Greathouse link

A136641 a(n) is the smallest positive integer that is coprime to n and has n divisors.

Original entry on oeis.org

1, 3, 4, 15, 16, 175, 64, 105, 100, 567, 1024, 1925, 4096, 3645, 784, 945, 65536, 13475, 262144, 6237, 1600, 295245, 4194304, 25025, 1296, 2657205, 4900, 40095, 268435456, 3776773, 1073741824, 10395, 25600, 215233605, 5184, 175175, 68719476736, 1937102445, 102400
Offset: 1

Views

Author

Leroy Quet, Apr 14 2008

Keywords

Comments

Is this the same as the least index m where A090387(m) = n? - Michel Marcus, Mar 25 2022
For p prime, a(p) = 2^(p-1) for p > 2, a(2*p) = 3^(p-1)*5 for p > 5, a(3*p) = 2^(p-1)*25 for p > 3, a(5*p) = 2^(p-1)*3^4 for p >5, ... . - Michael S. Branicky, Mar 26 2022

Examples

			The sequence of positive integers each with 9 divisors starts: 36, 100, 196, 225, 256, ... Now 36 is not coprime to 9. But 100, the next bigger value with 9 divisors, is. So a(9) = 100.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k=1); while ((gcd(n,k) != 1) || (numdiv(k) != n), k++); k; \\ Michel Marcus, Mar 25 2022
    
  • Python
    from math import gcd
    from sympy import divisor_count
    def a(n):
        k = 1
        while gcd(n, k) != 1 or divisor_count(k) != n: k += 1
        return k
    print([a(n) for n in range(1, 19)]) # Michael S. Branicky, Mar 25 2022

Extensions

a(11)-a(36) from Sean A. Irvine, May 03 2010
a(37) and beyond from Michael S. Branicky, Mar 26 2022

A368523 Positive integers in decreasing order of tau(k)/k, where tau(k) = A000005(k).

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 12, 5, 10, 9, 18, 24, 16, 20, 7, 14, 15, 30, 36, 28, 48, 40, 60, 21, 42, 32, 11, 22, 72, 13, 26, 27, 54, 56, 84, 44, 45, 90, 120, 80, 96, 33, 66, 25, 50, 17, 34, 52, 35, 70, 108, 64, 19, 38, 144, 39, 78, 180, 63, 126, 168, 88, 132, 100, 112
Offset: 1

Views

Author

Keith J. Bauer, Dec 28 2023

Keywords

Comments

Because tau(k)/k is bounded by 2/sqrt(k), this sequence is well-defined.
In the case of ties, terms are sorted from least to greatest.
Let c be the j-th distinct value of tau(a(n))/a(n). Terms of this sequence for which tau(a(n))/a(n) >= c are the proper divisors of A059992(j + 1) for 1 <= j <= 4. True for j = 0 if the 0th value of c is taken to be infinity. Pattern breaks for j > 4.

Examples

			tau(1)/1 = tau(2)/2 = 1
tau(4)/4 = 3/4
tau(3)/3 = tau(6)/6 = 2/3
tau(8)/8 = tau(12)/12 = 1/2
tau(5)/5 = tau(10)/10 = 2/5
tau(9)/9 = tau(18)/18 = tau(24)/24 = 1/3
		

Crossrefs

Programs

  • Lua
    length = 100
    result = {}
    for n = 1, length do
      local div_count = 0
      local root_n = math.sqrt(n)
      for d = 1, root_n do
        if n % d == 0 then
          div_count = div_count + 2
        end
      end
      if (root_n == math.floor(root_n)) then
        div_count = div_count - 1
      end
      result[n] = {n, div_count / n}
    end
    function compare(a, b)
      if a[2] ~= b[2] then
        return a[2] > b[2]
      else
        return a[1] < b[1]
      end
    end
    table.sort(result, compare)
    i = 1
    bound = 2 / math.sqrt(length)
    while result[i][2] >= bound do
      io.write(result[i][1] .. ',')
      i = i + 1
    end
  • Mathematica
    nmax = 100; s = Sort[Table[{k, DivisorSigma[0, k]/k}, {k, 1, nmax^2}], #1[[2]] >= #2[[2]] &]; Table[s[[j, 1]], {j, 1, nmax}] (* Vaclav Kotesovec, Jan 04 2024 *)

A355140 n/d(n) rounded to the nearest integer, where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 2, 3, 3, 6, 2, 7, 4, 4, 3, 9, 3, 10, 3, 5, 6, 12, 3, 8, 7, 7, 5, 15, 4, 16, 5, 8, 9, 9, 4, 19, 10, 10, 5, 21, 5, 22, 7, 8, 12, 24, 5, 16, 8, 13, 9, 27, 7, 14, 7, 14, 15, 30, 5, 31, 16, 11, 9, 16, 8, 34, 11, 17, 9, 36, 6, 37, 19, 13, 13, 19
Offset: 1

Views

Author

Sameer Khan, Jun 20 2022

Keywords

Comments

In the ambiguous case, fractions are rounded up.

Examples

			a(1) = round (1 / 1) = 1;
a(4) = round (4 / 3) = 1;
a(5) = round (5 / 2) = 3;
		

Crossrefs

Cf. A000005, A078709 (floor), A334762 (ceiling), A090395 (numerators), A090387 (denominators).

Programs

  • Mathematica
    Table[Floor[n/DivisorSigma[0,n]+1/2],{n,100}] (* Harvey P. Dale, Dec 22 2022 *)
  • Python
    from sympy import divisor_count
    def A355140(n): return (2*n+(d:=divisor_count(n)))//(2*d) # Chai Wah Wu, Jun 20 2022

Formula

a(n) = round (n / A000005(n)).
Showing 1-5 of 5 results.