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-10 of 47 results. Next

A179971 Positions of records in the sequence of harmonic means, i.e., in the sequence of rationals A099377(.)/A099378(.).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 12, 16, 18, 20, 24, 30, 36, 48, 60, 72, 84, 90, 108, 120, 144, 168, 180, 240, 336, 360, 420, 480, 504, 630, 720, 840, 1008, 1080, 1260, 1440, 1680, 2160, 2520, 3360, 3780, 3960, 4200, 4320, 4620, 5040, 7560, 9240, 10080, 12600, 13860, 15120
Offset: 1

Views

Author

Robert G. Wilson v, Aug 04 2010

Keywords

Examples

			The sequence of harmonic means starts 1 < 4/3 < 3/2 < 12/7, increasing from the first to the fourth, which adds 1 to 4 to the sequence.
The fifth harmonic mean is 5/3, smaller than 12/7 and not a record, so 5 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    hm := proc(n) option remember; n* numtheory[tau](n)/numtheory[sigma](n) ; end proc:
    A179971 := proc(n) option remember; if n = 1 then 1; else for k from procname(n-1)+1 do if hm(k) > hm(procname(n-1)) then return k; end if; end do; end if; end proc:
    seq(A179971(n),n=1..40) ; # R. J. Mathar, Aug 06 2010
  • Mathematica
    f[n_] := f[n] = DivisorSigma[0, n]/Plus @@ (1/Divisors@n); k = 1; mx = 0; lst = {}; While[k < 18480, a = f@k; If[a > mx, mx = a; AppendTo[lst, k]]; k++ ]; lst

Extensions

Definition rephrased by R. J. Mathar, Aug 06 2010

A348865 Numbers k such that A099378(k) | (A099377(k) - 1).

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 15, 24, 28, 30, 32, 42, 44, 55, 84, 91, 95, 120, 135, 140, 182, 198, 224, 234, 243, 261, 270, 308, 330, 351, 420, 444, 459, 477, 483, 492, 496, 546, 564, 570, 625, 630, 636, 672, 744, 756, 840, 852, 861, 924
Offset: 1

Views

Author

Amiram Eldar, Nov 02 2021

Keywords

Comments

A disjoint union of the harmonic numbers (A001599) and the numbers whose harmonic mean of divisors is of the form m + 1/k, where m and k are integers.

Examples

			2 is a term since the harmonic mean of divisors of 2 is 4/3 and 3 | (4-1).
		

Crossrefs

Programs

  • Mathematica
    h[n_] := DivisorSigma[0, n]/DivisorSigma[-1, n]; q[n_] := Divisible[Numerator[(h1 = h[n])] - 1, Denominator[h1]]; Select[Range[1000], q]

A348866 Composite numbers k such that A099378(k) | (A099377(k) + 1).

Original entry on oeis.org

6, 15, 20, 28, 33, 35, 42, 51, 66, 69, 70, 84, 87, 114, 117, 123, 135, 138, 140, 141, 153, 159, 177, 186, 204, 207, 210, 213, 249, 258, 267, 270, 273, 276, 282, 285, 297, 303, 308, 321, 339, 348, 354, 357, 372, 393, 399, 402, 411, 420, 426, 432, 435, 447, 464
Offset: 1

Views

Author

Amiram Eldar, Nov 02 2021

Keywords

Comments

A disjoint union of the harmonic numbers (A001599) and the composite numbers whose harmonic mean of divisors is of the form m - 1/k, where m and k are integers.
If p is an odd prime, then the harmonic mean of its divisors is p*tau(p)/sigma(p) = p*A000005(p)/A000203(p) = p/((p+1)/2), so A099378(p) | (A099377(p) + 1). Therefore, this sequence is restricted to composite numbers.
This sequence is infinite. For example, it includes all the semiprimes of the form 3*p, where p == 2 (mod 3).

Examples

			15 is a term since it is composite, the harmonic mean of divisors of 15 is 5/2 and 2 | (5+1).
		

Crossrefs

Programs

  • Mathematica
    h[n_] := DivisorSigma[0, n]/DivisorSigma[-1, n]; q[n_] := Divisible[Numerator[(h1 = h[n])] + 1, Denominator[h1]]; Select[Range[1000], CompositeQ[#] && q[#] &]

A348847 Numbers k where the ratios A099378(k)/k reach a record value.

Original entry on oeis.org

1, 2, 4, 8, 16, 36, 144, 576, 900, 3600, 14400, 32400, 129600, 435600, 6969600, 8643600, 34574400, 77792400, 311169600, 2498000400, 2800526400, 7779240000, 9992001600, 22482003600
Offset: 1

Views

Author

Amiram Eldar, Nov 02 2021

Keywords

Comments

Are there nonsquare terms in this sequence that are larger than 8?

Examples

			The first 4 ratios A099378(k)/k, for k = 1 to 4, are 1, 3/2, 2/3 and 7/4. The record values occur at k = 1, 2 and 4, the first 3 terms of this sequence.
		

Crossrefs

Programs

  • Mathematica
    r[n_] := Denominator[DivisorSigma[0, n]/DivisorSigma[-1, n]]/n; s = {}; rm = 0; Do[If[(r1 = r[n]) > rm, rm = r1; AppendTo[s, n]], {n, 1, 5*10^5}]; s

A099377 Numerators of the harmonic means of the divisors of the positive integers.

Original entry on oeis.org

1, 4, 3, 12, 5, 2, 7, 32, 27, 20, 11, 18, 13, 7, 5, 80, 17, 36, 19, 20, 21, 22, 23, 16, 75, 52, 27, 3, 29, 10, 31, 64, 11, 68, 35, 324, 37, 38, 39, 32, 41, 7, 43, 22, 45, 23, 47, 120, 49, 100, 17, 156, 53, 18, 55, 56, 57, 116, 59, 30, 61, 31, 189, 448, 65, 11, 67, 68, 23, 35
Offset: 1

Views

Author

Eric W. Weisstein, Oct 13 2004

Keywords

Examples

			1, 4/3, 3/2, 12/7, 5/3, 2, 7/4, 32/15, ...
		

Crossrefs

Cf. A099378.

Programs

  • Mathematica
    f[n_] := DivisorSigma[0, n]/Plus @@ (1/Divisors@n); Numerator@ Array[f, 70] (* Robert G. Wilson v, Aug 04 2010 *)
    Table[Numerator[DivisorSigma[0, n]/DivisorSigma[-1, n]], {n, 70}] (* Ivan Neretin, Nov 13 2016 *)
  • PARI
    a(n) = my(d=divisors(n)); numerator(#d/sum(k=1, #d, 1/d[k])); \\ Michel Marcus, Nov 13 2016
    
  • Python
    from sympy import gcd, divisor_sigma
    def A099377(n): return (lambda x, y: y*n//gcd(x,y*n))(divisor_sigma(n),divisor_sigma(n,0)) # Chai Wah Wu, Oct 20 2021

Extensions

More terms from Robert G. Wilson v, Aug 04 2010

A349473 Irregular triangle read by rows: the n-th row contains the elements in the continued fraction of the harmonic mean of the divisors of n.

Original entry on oeis.org

1, 1, 3, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 2, 7, 2, 2, 13, 2, 4, 2, 1, 1, 5, 2, 1, 1, 3, 1, 1, 6, 2, 3, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 8, 2, 1, 3, 3, 1, 1, 9, 2, 1, 6, 2, 1, 1, 1, 2, 2, 2, 4, 1, 1, 11, 3, 5, 2, 2, 2, 1, 1, 2, 2, 2, 10, 2, 1, 2, 3, 3, 1, 1, 14
Offset: 1

Views

Author

Amiram Eldar, Nov 19 2021

Keywords

Comments

For an odd prime p > 3, the p-th row has a length 3 with a(p, 1) = a(p, 2) = 1 and a(p, 3) = (p-1)/2.
For a harmonic number m = A001599(k), the m-th row has a length 1 with a(k, 1) = A099377(m) = A001600(k).

Examples

			The first ten rows of the triangle are:
  1,
  1, 3,
  1, 2,
  1, 1, 2, 2,
  1, 1, 2,
  2,
  1, 1, 3,
  2, 7, 2,
  2, 13,
  2, 4, 2
  ...
		

Crossrefs

Cf. A349474 (row lengths).

Programs

  • Mathematica
    row[n_] := ContinuedFraction[DivisorSigma[0, n] / DivisorSigma[-1, n]]; Table[row[k], {k, 1, 29}] // Flatten

A103339 Numerator of the unitary harmonic mean (i.e., the harmonic mean of the unitary divisors) of the positive integer n.

Original entry on oeis.org

1, 4, 3, 8, 5, 2, 7, 16, 9, 20, 11, 12, 13, 7, 5, 32, 17, 12, 19, 8, 21, 22, 23, 8, 25, 52, 27, 14, 29, 10, 31, 64, 11, 68, 35, 72, 37, 38, 39, 80, 41, 7, 43, 44, 3, 23, 47, 48, 49, 100, 17, 104, 53, 18, 55, 28, 57, 116, 59, 4, 61, 31, 63, 128, 65, 11, 67, 136, 23, 35, 71, 16, 73
Offset: 1

Views

Author

Emeric Deutsch, Jan 31 2005

Keywords

Examples

			1, 4/3, 3/2, 8/5, 5/3, 2, ...
a(8) = 16 because the unitary divisors of 8 are {1,8} and 2/(1/1 + 1/8) = 16/9.
		

Crossrefs

Cf. A103340 (denominators), A099377, A099378.

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a103339 = numerator . uhm where uhm n = (n * a034444 n) % (a034448 n)
    -- Reinhard Zumkeller, Mar 17 2012
    
  • Maple
    with(numtheory): udivisors:=proc(n) local A, k: A:={}: for k from 1 to tau(n) do if gcd(divisors(n)[k],n/divisors(n)[k])=1 then A:=A union {divisors(n)[k]} else A:=A fi od end: utau:=n->nops(udivisors(n)): usigma:=n->sum(udivisors(n)[j],j=1..nops(udivisors(n))): uH:=n->n*utau(n)/usigma(n):seq(numer(uH(n)),n=1..81);
  • Mathematica
    ud[n_] := 2^PrimeNu[n]; usigma[n_] := DivisorSum[n, If[GCD[#, n/#] == 1, #, 0]&]; a[1] = 1; a[n_] := Numerator[n*ud[n]/usigma[n]]; Array[a, 100] (* Jean-François Alcover, Dec 03 2016 *)
    a[n_] := Numerator[n * Times @@ (2 / (1 + Power @@@ FactorInteger[n]))]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Mar 10 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); numerator(n * prod(i=1, #f~, 2/(1 + f[i, 1]^f[i, 2]))); } \\ Amiram Eldar, Mar 10 2023
  • Python
    from sympy import gcd
    from sympy.ntheory.factor_ import udivisor_sigma
    def A103339(n): return (lambda x, y: y*n//gcd(x,y*n))(udivisor_sigma(n),udivisor_sigma(n,0)) # Chai Wah Wu, Oct 20 2021
    

Formula

a(A006086(n)) = A006087(n). - Reinhard Zumkeller, Mar 17 2012
From Amiram Eldar, Mar 10 2023: (Start)
a(n)/A103340(n) = n*A034444(n)/A034448(n).
a(n)/A103340(n) <= A099377(n)/A099378(n), with equality if and only if n is squarefree (A005117). (End)

A103340 Denominator of the unitary harmonic mean (i.e., the harmonic mean of the unitary divisors) of the positive integer n.

Original entry on oeis.org

1, 3, 2, 5, 3, 1, 4, 9, 5, 9, 6, 5, 7, 3, 2, 17, 9, 5, 10, 3, 8, 9, 12, 3, 13, 21, 14, 5, 15, 3, 16, 33, 4, 27, 12, 25, 19, 15, 14, 27, 21, 2, 22, 15, 1, 9, 24, 17, 25, 39, 6, 35, 27, 7, 18, 9, 20, 45, 30, 1, 31, 12, 20, 65, 21, 3, 34, 45, 8, 9, 36, 5, 37, 57, 26, 25, 24, 7, 40, 51, 41, 63
Offset: 1

Views

Author

Emeric Deutsch, Jan 31 2005

Keywords

Examples

			1, 4/3, 3/2, 8/5, 5/3, 2, ...
a(8) = 9 because the unitary divisors of 8 are {1,8} and 2/(1/1 + 1/8) = 16/9.
		

Crossrefs

Cf. A103339 (numerators), A099377, A099378.

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a103340 = denominator . uhm where uhm n = (n * a034444 n) % (a034448 n)
    -- Reinhard Zumkeller, Mar 17 2012
    
  • Maple
    with(numtheory): udivisors:=proc(n) local A, k: A:={}: for k from 1 to tau(n) do if gcd(divisors(n)[k], n/divisors(n)[k])=1 then A:=A union {divisors(n)[k]} else A:=A fi od end: utau:=n->nops(udivisors(n)): usigma:=n->sum(udivisors(n)[j],j=1..nops(udivisors(n))): uH:=n->n*utau(n)/usigma(n):seq(denom(uH(n)),n=1..90);
  • Mathematica
    ud[n_] := 2^PrimeNu[n]; usigma[n_] := DivisorSum[n, If[GCD[#, n/#] == 1, #, 0]&]; a[1] = 1; a[n_] := Denominator[n*ud[n]/usigma[n]]; Array[a, 100] (* Jean-François Alcover, Dec 03 2016 *)
    a[n_] := Denominator[n * Times @@ (2 / (1 + Power @@@ FactorInteger[n]))]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Mar 10 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); denominator(n * prod(i=1, #f~, 2/(1 + f[i, 1]^f[i, 2]))); } \\ Amiram Eldar, Mar 10 2023
  • Python
    from sympy import gcd
    from sympy.ntheory.factor_ import udivisor_sigma
    def A103340(n): return (lambda x, y: x//gcd(x,y*n))(udivisor_sigma(n),udivisor_sigma(n,0)) # Chai Wah Wu, Oct 20 2021
    

Formula

a(A006086(n)) = 1. - Reinhard Zumkeller, Mar 17 2012

A349474 a(n) is the length of the continued fraction of the harmonic mean of the divisors of n.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Nov 19 2021

Keywords

Comments

a(n) = 1 if and only if n is a harmonic number (A001599).
a(n) <= 2 if and only if n is in A348865.

Examples

			a(1) = 1 since the harmonic mean of the divisors of 1 is 1 and its continued fraction has 1 element, {1}.
a(2) = 2 since the harmonic mean of the divisors of 2 is 4/3 = 1 + 1/3 and its continued fraction has 2 elements, {1, 3}.
a(4) = 4 since the harmonic mean of the divisors of 4 is 12/7 = 1 + 1/(1 + 1/(2 + 1/2)) and its continued fraction has 4 elements, {1, 1, 2, 2}.
		

Crossrefs

Row length of A349473.

Programs

  • Mathematica
    a[n_] := Length @ ContinuedFraction[DivisorSigma[0, n] / DivisorSigma[-1, n]]; Array[a, 100]

A074266 Numbers k such that the harmonic mean of the divisors of k is the square of a rational number.

Original entry on oeis.org

1, 216, 468, 810, 1550, 1638, 3744, 10880, 11340, 13965, 21700, 23716, 40176, 45847, 50274, 56896, 80262, 90720, 97969, 126360, 128744, 137940, 139159, 161728, 173600, 189728, 224450, 319579, 434511, 482790, 515450, 526500, 555660
Offset: 1

Views

Author

Joseph L. Pe, Sep 20 2002

Keywords

Examples

			The harmonic mean of the divisors of 468 is 324/49 = (18/7)^2, the square of a rational number, so 468 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    H[l_] := Module[{m, s}, m = Length[l]; s = 0; For[i = 1, i <= m, i++, s = s + (1/l[[i]])]; s = s/m; s = 1/s; s] r = {}; Do[d = Divisors[n]; h = H[d]; num = Numerator[h]; den = Denominator[h]; If[IntegerQ[num^(1/2)] && IntegerQ[den^(1/2)], r = Append[r, n]], {n, 1, 10^6}]; r
Showing 1-10 of 47 results. Next