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.

Previous Showing 11-20 of 49 results. Next

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

A250094 Positive integers k such that the numerator of the harmonic mean of the divisors of k is equal to k.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 17, 19, 20, 21, 22, 23, 27, 29, 31, 35, 37, 38, 39, 41, 43, 45, 47, 49, 53, 55, 56, 57, 59, 61, 65, 67, 68, 71, 73, 77, 79, 83, 85, 86, 89, 93, 97, 99, 101, 103, 107, 109, 110, 111, 113, 115, 116, 118, 119, 125, 127, 129, 131, 133, 134
Offset: 1

Views

Author

Colin Barker, Nov 12 2014

Keywords

Comments

A subsequence of A099377: n such that A099377(n) = n.
All odd primes are in this sequence.

Examples

			20 is a term because the divisors of 20 are [1,2,4,5,10,20] and 6 / (1/1 + 1/2 + 1/4 + 1/5 + 1/10 + 1/20) = 20/7.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200],Numerator[HarmonicMean[Divisors[#]]]==#&] (* Harvey P. Dale, May 24 2017 *)
    Select[Range[134], Numerator[DivisorSigma[0, #] * #/DivisorSigma[1, #]] == # &] (* Amiram Eldar, Mar 02 2020 *)
  • PARI
    harmonicmean(v) = #v / sum(k=1, #v, 1/v[k])
    s=[]; for(n=1, 500, if(numerator(harmonicmean(divisors(n)))==n, s=concat(s, n))); s

A361316 Numerators of the harmonic means of the infinitary divisors of the positive integers.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Mar 09 2023

Keywords

Examples

			Fractions begin with 1, 4/3, 3/2, 8/5, 5/3, 2, 7/4, 32/15, 9/5, 20/9, 11/6, 12/5, ...
		

Crossrefs

Similar sequences: A099377, A103339.

Programs

  • Mathematica
    f[p_, e_] := Module[{b = IntegerDigits[e, 2], m}, m = Length[b]; Product[If[b[[j]] > 0, 2/(1 + p^(2^(m - j))), 1], {j, 1, m}]]; a[1] = 1; a[n_] := Numerator[n * Times @@ f @@@ FactorInteger[n]]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n), b); numerator(n * prod(i=1, #f~, b = binary(f[i, 2]); prod(k=1, #b, if(b[k], 2/(f[i, 1]^(2^(#b-k))+1), 1)))); }

Formula

a(n) = numerator(n*A037445(n)/A049417(n)).
a(n)/A361317(n) <= A099377(n)/A099378(n), with equality if and only if n is in A036537.
a(n)/A361317(n) >= A103339(n)/A103340(n), with equality if and only if n is in A138302.

A361782 Numerators of the harmonic means of the bi-unitary divisors of the positive integers.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Mar 24 2023

Keywords

Examples

			Fractions begin with 1, 4/3, 3/2, 8/5, 5/3, 2, 7/4, 32/15, 9/5, 20/9, 11/6, 12/5, ...
		

Crossrefs

Cf. A188999, A222266, A286324, A361783 (denominators).
Similar sequences: A099377, A103339, A361316.

Programs

  • Mathematica
    f[p_, e_] := p^e * If[OddQ[e], (e + 1)*(p - 1)/(p^(e + 1) - 1), e/((p^(e + 1) - 1)/(p - 1) - p^(e/2))]; a[1] = 1; a[n_] := Numerator[Times @@ f @@@ FactorInteger[n]]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n), p, e); numerator(n * prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2];  if(e%2, (e + 1)*(p - 1)/(p^(e + 1) - 1), e/((p^(e + 1) - 1)/(p - 1) - p^(e/2))))); }

Formula

a(n) = numerator(n*A286324(n)/A188999(n)).
f(n) = a(n)/A361783(n) is multiplicative with f(p^e) = (e+1)*(p-1)/(p^(e+1)-1) if e is odd, and e/((p^(e+1)-1)/(p-1) - p^(e/2)) if e is even.

A335369 Harmonic numbers k such that k*p is not a harmonic number for all the primes p that do not divide k.

Original entry on oeis.org

1, 6, 140, 496, 672, 2970, 27846, 105664, 173600, 237510, 539400, 695520, 726180, 753480, 1421280, 1539720, 2229500, 2290260, 8872200, 11981970, 14303520, 15495480, 33550336, 50401728, 71253000, 80832960, 90409410, 144963000, 221557248, 233103780, 287425800, 318177800
Offset: 1

Views

Author

Amiram Eldar, Jun 03 2020

Keywords

Comments

If k is a harmonic number (A001599) and p is a prime that does not divide k, then k*p is a harmonic number if and only if (p+1)/2 is a divisor of the harmonic mean of the divisors of k, h(k) = k*tau(k)/sigma(k) = k*A000005(k)/A000203(k). The terms of this sequence are harmonic numbers k such that for all the divisors d of h(k), 2*d - 1 is either a nonprime or a prime divisor of k.
The even perfect numbers, 2^(p-1)*(2^p - 1) where p is a Mersenne exponent (A000043), have harmonic mean of divisors p. Therefore, they are in this sequence if p = 2 or if 2*p - 1 is composite (i.e., not in A172461). Of the first 47 Mersenne exponents there are 37 such primes (p = 2, 5, 13, 17, ...), with the corresponding even perfect numbers 6, 496, 33550336, 8589869056, ...

Examples

			1 is a term since it is a harmonic number, and there is no prime p such that 1*p = p is a harmonic number (if p is a prime, h(p) = 2*p/(p+1) cannot be an integer).
		

Crossrefs

Programs

  • Mathematica
    harmNums = Cases[Import["https://oeis.org/A001599/b001599.txt", "Table"], {, }][[;; , 2]]; harMean[n_] := n * DivisorSigma[0, n]/DivisorSigma[1, n]; primeCountQ[n_] := Module[{d = Divisors[harMean[n]]}, Select[2*d - 1, PrimeQ[#] && ! Divisible[n, #] &] == {}]; Select[harmNums, primeCountQ]

A348658 Numbers whose numerator and denominator of the harmonic mean of their divisors are both Fibonacci numbers.

Original entry on oeis.org

1, 3, 5, 6, 15, 21, 28, 140, 182, 496, 546, 672, 918, 1890, 2016, 4005, 4590, 24384, 52780, 55860, 68200, 84812, 90090, 105664, 145782, 186992, 204600, 381654, 728910, 907680, 1655400, 2302344, 2862405, 3828009, 3926832, 5959440, 21059220, 33550336, 33839988, 42325920
Offset: 1

Views

Author

Amiram Eldar, Oct 28 2021

Keywords

Comments

Terms that also Fibonacci numbers are 1, 3, 5, 21, and no more below Fibonacci(300).

Examples

			3 is a term since the harmonic mean of its divisors is 3/2 = Fibonacci(4)/Fibonacci(3).
15 is a term since the harmonic mean of its divisors is 5/2 = Fibonacci(5)/Fibonacci(3).
		

Crossrefs

Similar sequences: A074266, A123193, A272412, A272440, A348659.

Programs

  • Mathematica
    fibQ[n_] := Or @@ IntegerQ /@ Sqrt[{5 n^2 - 4, 5 n^2 + 4}]; h[n_] := DivisorSigma[0, n]/DivisorSigma[-1, n]; q[n_] := fibQ[Numerator[(hn = h[n])]] && fibQ[Denominator[hn]]; Select[Range[1000], q]
  • Python
    from itertools import islice
    from sympy import integer_nthroot, gcd, divisor_sigma
    def A348658(): # generator of terms
        k = 1
        while True:
            a, b = divisor_sigma(k), divisor_sigma(k,0)*k
            c = gcd(a,b)
            n1, n2 = 5*(a//c)**2-4, 5*(b//c)**2-4
            if (integer_nthroot(n1,2)[1] or integer_nthroot(n1+8,2)[1]) and (integer_nthroot(n2,2)[1] or integer_nthroot(n2+8,2)[1]):
                yield k
            k += 1
    A348658_list = list(islice(A348658(),10)) # Chai Wah Wu, Oct 28 2021

A348659 Numbers whose numerator and denominator of the harmonic mean of their divisors are both prime numbers.

Original entry on oeis.org

3, 5, 13, 14, 15, 37, 42, 61, 66, 73, 92, 114, 157, 182, 193, 258, 277, 308, 313, 397, 402, 421, 457, 476, 477, 541, 546, 570, 613, 661, 673, 733, 744, 757, 812, 877, 978, 997, 1093, 1148, 1153, 1201, 1213, 1237, 1266, 1278, 1321, 1381, 1428, 1453, 1621, 1657
Offset: 1

Views

Author

Amiram Eldar, Oct 28 2021

Keywords

Comments

The prime terms of this sequence are the primes p such that (p+1)/2 is also a prime (A005383).
If p is in A109835, then p*(2*p-1) is a semiprime term.

Examples

			3 is a term since the harmonic mean of its divisors is 3/2 and both 2 and 3 are primes.
		

Crossrefs

Similar sequences: A023194, A048968, A074266, A348659.

Programs

  • Mathematica
    q[n_] := Module[{h = DivisorSigma[0, n]/DivisorSigma[-1, n]}, And @@ PrimeQ[{Numerator[h], Denominator[h]}]]; Select[Range[2000], q]

A349476 Numbers k such that the continued fraction of the harmonic mean of the divisors of k contains a single distinct element.

Original entry on oeis.org

1, 6, 15, 28, 30, 140, 270, 496, 545, 672, 792, 1365, 1638, 2970, 3515, 6200, 8128, 8190, 18600, 18620, 27846, 30240, 32760, 44950, 46359, 55860, 59670, 105664, 117800, 167400, 173600, 237510, 242060, 253539, 332640, 360360, 539400, 681156, 691782, 695520, 726180, 753480, 950976
Offset: 1

Views

Author

Amiram Eldar, Nov 19 2021

Keywords

Comments

All the harmonic numbers (A001599) are terms of this sequence.
The least term with m elements in the continued fraction of the harmonic mean of its divisors for m = 1, 2, 3, and 4 is 1, 15, 792 and 545, respectively.
Are there terms with more than 4 elements? There are no such terms below 2*10^9.

Examples

			15 is a term since the harmonic mean of its divisors is 5/2 = 2 + 1/2.
545 is a term since the harmonic mean of its divisors is 109/33 = 3 + 1/(3 + 1/(3 + 1/3)).
792 is a term since the harmonic mean of its divisors is 528/65 = 8 + 1/(8 + 1/8).
		

Crossrefs

Programs

  • Mathematica
    c[n_] := ContinuedFraction[DivisorSigma[0, n] / DivisorSigma[-1, n]]; q[n_] := Length[Union[c[n]]] == 1; Select[Range[10^6], q]

A379945 Irregular triangle read by rows: T(n, k) is the numerator of the harmonic mean of all positive divisors of n except the k-th of them.

Original entry on oeis.org

2, 1, 3, 1, 8, 8, 4, 5, 1, 3, 2, 9, 18, 7, 1, 24, 24, 24, 12, 9, 9, 3, 15, 30, 15, 30, 11, 1, 15, 30, 5, 12, 30, 20, 13, 1, 21, 42, 21, 42, 5, 45, 15, 45, 64, 64, 64, 64, 32, 17, 1, 30, 3, 30, 5, 90, 45, 19, 1, 50, 25, 100, 50, 5, 100, 63, 63, 63, 63, 33, 66, 33, 66, 23, 1
Offset: 2

Views

Author

Stefano Spezia, Jan 07 2025

Keywords

Examples

			The irregular triangle begins as:
   2,  1;
   3,  1;
   8,  8,  4;
   5,  1;
   3,  2,  9, 18;
   7,  1;
  24, 24, 24, 12;
   9,  9,  3;
  15, 30, 15, 30;
  ...
The irregular triangle of the related fractions begins as:
     2,     1;
     3,     1;
   8/3,   8/5,   4/3;
     5,     1;
     3,     2,   9/5,  18/11;
   7,1;
  24/7, 24/11, 24/13,   12/7;
   9/2,   9/5,   3/2;
  15/4, 30/13,  15/8,  30/17;
  ...
		

Crossrefs

Cf. A000005, A000203, A001599, A027750, A099377, A379946 (denominator).

Programs

  • Mathematica
    T[n_,k_]:=Numerator[n(DivisorSigma[0,n]-1)/(DivisorSigma[1,n]-n/Part[Divisors[n],k])]; Table[T[n,k],{n,2,23},{k,DivisorSigma[0,n]}]//Flatten

Formula

T(n, k) = numerator(n*(tau(n) - 1)/(sigma(n) - n/A027750(n, k))).
Previous Showing 11-20 of 49 results. Next