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

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

Original entry on oeis.org

8, 15, 18, 21, 33, 35, 39, 45, 51, 55, 57, 63, 65, 69, 77, 81, 85, 87, 91, 93, 95, 99, 111, 115, 117, 119, 123, 128, 129, 133, 141, 143, 145, 147, 153, 155, 159, 161, 162, 171, 175, 177, 183, 185, 187, 201, 203, 205, 207, 209, 213, 215, 217, 219, 221, 235
Offset: 1

Views

Author

Colin Barker, Nov 17 2014

Keywords

Comments

No primes are in this sequence.

Examples

			18 is a term because the nontrivial divisors of 18 are [2,3,6,9] and 4 / (1/2 + 1/3 + 1/6 + 1/9) = 18/5.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[235], CompositeQ[#] && Numerator[(DivisorSigma[0, #] - 2) * #/(DivisorSigma[1, #] - # -1)] == # &] (* Amiram Eldar, Mar 02 2020 *)
  • PARI
    harmonicmean(v) = #v / sum(k=1, #v, 1/v[k])
    nontrivialdivisors(n) = d=divisors(n); vector(#d-2, k, d[k+1])
    s=[]; for(n=2, 500, t=nontrivialdivisors(n); if(#t>0 && numerator(harmonicmean(t))==n, s=concat(s, n))); s

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

Original entry on oeis.org

4, 27, 28, 54, 56, 64, 68, 91, 99, 100, 133, 138, 148, 154, 165, 188, 217, 222, 247, 259, 268, 276, 279, 290, 301, 308, 369, 375, 388, 403, 414, 427, 428, 430, 469, 474, 481, 508, 511, 540, 544, 548, 549, 553, 559, 589, 609, 621, 627, 628, 639, 642, 665, 668
Offset: 1

Views

Author

Colin Barker, Nov 12 2014

Keywords

Examples

			27 is a term because the proper divisors of 27 are [1,3,9] and 3 / (1/1 + 1/3 + 1/9) = 27/13.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[668], CompositeQ[#] && Numerator[(DivisorSigma[0, #] - 1) * #/(DivisorSigma[1, #] - 1)] == # &] (* Amiram Eldar, Mar 02 2020 *)
  • PARI
    harmonicmean(v) = #v / sum(k=1, #v, 1/v[k])
    properdivisors(n) = d=divisors(n); vector(#d-1, k, d[k])
    s=[]; for(n=2, 1000, if(numerator(harmonicmean(properdivisors(n)))==n, s=concat(s, n))); s

A348510 a(n) = A099377(n) - n, where A099377(n) is the numerator of the harmonic mean of the divisors of n.

Original entry on oeis.org

0, 2, 0, 8, 0, -4, 0, 24, 18, 10, 0, 6, 0, -7, -10, 64, 0, 18, 0, 0, 0, 0, 0, -8, 50, 26, 0, -25, 0, -20, 0, 32, -22, 34, 0, 288, 0, 0, 0, -8, 0, -35, 0, -22, 0, -23, 0, 72, 0, 50, -34, 104, 0, -36, 0, 0, 0, 58, 0, -30, 0, -31, 126, 384, 0, -55, 0, 0, -46, -35, 0, 216, 0, 74, 150, 38, 0, -52, 0, 320, 324, 82, 0, -75
Offset: 1

Views

Author

Antti Karttunen, Oct 31 2021

Keywords

Crossrefs

Cf. A099377, A250094 (positions of zeros), A348968, A348969.

Programs

  • Mathematica
    a[n_] := Numerator[DivisorSigma[0, n]/DivisorSigma[-1, n]] - n; Array[a, 100] (* Amiram Eldar, Oct 31 2021 *)
  • PARI
    A099377(n) = { my(d=divisors(n)); numerator(#d/sum(k=1, #d, 1/d[k])); }; \\  From A099377
    A348510(n) = (A099377(n)-n);

A346400 Composite numbers k such that the numerator of the harmonic mean of the divisors of k is equal to k.

Original entry on oeis.org

20, 21, 22, 27, 35, 38, 39, 45, 49, 55, 56, 57, 65, 68, 77, 85, 86, 93, 99, 110, 111, 115, 116, 118, 119, 125, 129, 133, 134, 143, 147, 150, 155, 161, 164, 166, 169, 183, 184, 185, 187, 189, 201, 203, 205, 207, 209, 212, 214, 215, 217, 219, 221, 235, 237, 245
Offset: 1

Views

Author

Amiram Eldar, Nov 01 2021

Keywords

Comments

Composite numbers k such that A099377(k) = k.
Since the harmonic mean of the divisors of an odd prime p is p/((p+1)/2), its numerator is equal to p. Therefore, this sequence is restricted to composite numbers.
This sequence is infinite. For example, if p is a prime of the form 8*k+3 (A007520) with k>1, then 2*p is a term.

Examples

			20 is a term since the harmonic mean of the divisors of 20 is 20/7.
		

Crossrefs

Intersection of A002808 and A250094.

Programs

  • Mathematica
    q[n_] := CompositeQ[n] && Numerator[DivisorSigma[0, n]/DivisorSigma[-1, n]] == n; Select[Range[250], q]
  • PARI
    isok(k) = my(d=divisors(k)); (#d>2) && (numerator(#d/sum(i=1, #d, 1/d[i])) == k); \\ Michel Marcus, Nov 01 2021
    
  • PARI
    list(lim)=my(v=List()); forfactored(n=20,lim\1, if(vecsum(n[2][,2])>1 && numerator(sigma(n,0)/sigma(n,-1))==n[1], listput(v,n[1]))); Vec(v) \\ Charles R Greathouse IV, Nov 01 2021
Showing 1-4 of 4 results.