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 25 results. Next

A006087 Unitary harmonic means H(n) of the unitary harmonic numbers (A006086).

Original entry on oeis.org

1, 2, 3, 4, 4, 7, 7, 6, 9, 13, 10, 13, 10, 7, 11, 15, 10, 15, 9, 12, 7, 17, 12, 18, 16, 14, 19, 20, 19, 12, 15, 20, 10, 20, 18, 22, 19, 13, 12, 13, 17, 29, 18, 33, 20, 23, 29, 34, 23, 22, 31, 38, 24, 23, 38, 33, 37, 40, 19, 38, 24, 37, 29, 40, 22, 34, 24, 33
Offset: 1

Views

Author

Keywords

Comments

Let d(n) and sigma(n) be number and sum of unitary divisors of n; then unitary harmonic mean of unitary divisors is H(n)=n*d(n)/sigma(n).
Each term appears a finite number of times in the sequence (Hagis and Lord, 1975). - Amiram Eldar, Mar 10 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), numerator, denominator)
    a006087 n = a006087_list !! (n-1)
    a006087_list = map numerator $ filter ((== 1) . denominator) $
       map uhm [1..]  where uhm n = (n * a034444 n) % (a034448 n)
    -- Reinhard Zumkeller, Mar 17 2012
  • Maple
    A034444 := proc(n) 2^nops(ifactors(n)[2]) ; end: A034448 := proc(n) local ans,i,ifs ; ans :=1 ; ifs := ifactors(n)[2] ; for i from 1 to nops(ifs) do ans := ans*(1+ifs[i][1]^ifs[i][2]) ; od ; RETURN(ans) ; end: A006086 := proc(n) n*A034444(n)/A034448(n) ; end: for n from 1 to 5000000 do uhn := A006086(n) : if type(uhn,'integer') then printf("%d, ",uhn) ; fi ; od : # R. J. Mathar, Jun 06 2007
  • Mathematica
    ud[n_] := 2^PrimeNu[n]; usigma[n_] := Sum[ If[ GCD[d, n/d] == 1, d, 0], {d, Divisors[n]}]; a[n_] := n*ud[n]/usigma[n]; a[1] = 1; Reap[ Do[ If[ IntegerQ[h = a[n]], Print[h]; Sow[h]], {n, 1, 10^7}]][[2, 1]] (* Jean-François Alcover, May 16 2013 *)
    uh[n_] := n * Times @@ (2/(1 + Power @@@ FactorInteger[n])); uh[1] = 1; Select[Array[uh, 10^6], IntegerQ] (* Amiram Eldar, Mar 10 2023 *)
  • PARI
    {ud(n)=2^omega(n)} {sud(n) = sumdiv(n, d, if(gcd(d, n/d)==1, d))} {H(n)=n*ud(n)/sud(n)} for(n=1,10000000,if(((n*ud(n))%sud(n))==0,print1(H(n)","))) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Mar 02 2008
    
  • PARI
    uhmean(n) = {my(f = factor(n)); n*prod(i=1, #f~, 2/(1+f[i, 1]^f[i, 2])); };
    lista(kmax) = {my(uh); for(k = 1, kmax, uh = uhmean(k); if(denominator(uh) == 1, print1(uh, ", ")));} \\ Amiram Eldar, Mar 10 2023
    

Formula

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

Extensions

More terms from R. J. Mathar, Jun 06 2007
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Mar 02 2008

A353038 Unitary harmonic numbers (A006086) that are not unitary arithmetic numbers (A103826).

Original entry on oeis.org

90, 40682250, 81364500, 105773850, 423095400, 1798155450, 14385243600
Offset: 1

Views

Author

Amiram Eldar, Apr 19 2022

Keywords

Comments

There are 290 unitary harmonic numbers below 10^12, and only 7 of them are in this sequence.

Examples

			90 is in the sequence since its unitary divisors are {1, 2, 5, 9, 10, 18, 45, 90}, their harmonic mean, 4, is an integer, but their arithmetic mean, 45/2, is not.
		

Crossrefs

The unitary version of A046999.
Subsequence of A006086.

Programs

  • Mathematica
    q[n_] := Module[{f = FactorInteger[n], d, s}, d = 2^Length[f]; s = Times @@ (1 + Power @@@ f); IntegerQ[n*d/s] && !IntegerQ[s/d]]; Select[Range[5*10^7], q]

A353040 Unitary harmonic numbers (A006086) with a record number of unitary divisors.

Original entry on oeis.org

1, 6, 60, 420, 5460, 791700, 93284100, 3915147600, 285805774800
Offset: 1

Views

Author

Amiram Eldar, Apr 19 2022

Keywords

Comments

The corresponding record values are 1, 4, 8, 16, 32, 64, 128, 256, 512, ...

Examples

			The first 6 unitary harmonic numbers are 1, 6, 45, 60, 90, and 420. Their numbers of unitary divisors (A034444) are 1, 4, 4, 8, 8 and 16. The record values, 1, 4, 8 and 16 occur at 1, 6, 60 and 420, the first 4 terms of this sequence.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := 2 * p^e/(p^e + 1); r[n_] := Times @@ f @@@ FactorInteger[n]; dm = 0; s = {}; Do[h = r[n]; If[IntegerQ[h] && (d = 2^PrimeNu[n]) > dm, dm = d; AppendTo[s, n]], {n, 1, 10^6}]; s

A286325 Bi-unitary harmonic numbers.

Original entry on oeis.org

1, 6, 45, 60, 90, 270, 420, 630, 672, 2970, 5460, 8190, 9072, 9100, 10080, 15925, 22680, 22848, 27300, 30240, 40950, 45360, 54600, 81900, 95550, 99792, 136500, 163800, 172900, 204750, 208656, 245700, 249480, 312480, 332640, 342720, 385560, 409500, 472500, 491400
Offset: 1

Views

Author

Michel Marcus, May 07 2017

Keywords

Comments

A number m is a term if the sum of its bi-unitary divisors, A188999(m) divides the product of m by the number of its bi-unitary divisors A286324(m).
Numbers k whose harmonic mean of their bi-unitary divisors, A361782(k)/A361783(k), is an integer. - Amiram Eldar, Mar 24 2023

Crossrefs

Cf. A001599 (Ore harmonic), A006086 (unitary harmonic).

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))]; bhQ[n_] := IntegerQ[Times @@ f @@@ FactorInteger[n]]; bhQ[1] = True; Select[Range[10^5], bhQ] (* Amiram Eldar, Mar 24 2023 *)
  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d); }
    gcud(n, m) = vecmax(setintersect(udivs(n), udivs(m)));
    biudivs(n) = select(x->(gcud(x, n/x)==1), divisors(n));
    isok(n) = my(v=biudivs(n)); denominator(n*#v/vecsum(v))==1;

A319745 Nonunitary harmonic numbers: numbers such that the harmonic mean of their nonunitary divisors is an integer.

Original entry on oeis.org

4, 9, 12, 18, 24, 25, 45, 49, 54, 60, 112, 121, 126, 150, 168, 169, 270, 289, 294, 336, 361, 529, 560, 594, 637, 726, 841, 961, 1014, 1232, 1369, 1638, 1680, 1681, 1734, 1849, 1984, 2166, 2184, 2209, 2430, 2520, 2688, 2700, 2809, 2850, 3174, 3481, 3721, 3780
Offset: 1

Views

Author

Amiram Eldar, Sep 27 2018

Keywords

Comments

Includes all the numbers with a single nonunitary divisor. Those with more than one: 12, 18, 24, 45, 54, 60, 112, ...
Supersequence of A064591 (nonunitary perfect numbers).
Ligh & Wall showed that if p, 2p-1 and 2^p-1 are distinct primes (A172461, except for 2), then the following numbers are in the sequence: 6*p^2, p^2*(2p-1), 6*p^2*(2p-1), 2^(p+1)*3*(2^p-1), 2^(p+1)*15*(2^p-1) and 2^(p+1)*(2p-1)*(2^p-1).

Crossrefs

Programs

  • Mathematica
    nudiv[n_] := Block[{d = Divisors[n]}, Select[d, GCD[#, n/#] > 1 &]]; nhQ[n_]:= Module[ {divs=nudiv[n]}, Length[divs] > 0 && IntegerQ[HarmonicMean[divs]]]; Select[Range[30000], nhQ]
  • PARI
    hm(v) = #v/sum(k=1, #v, 1/v[k]);
    vnud(n) = select(x->(gcd(x, n/x)!=1), divisors(n));
    isok(n) = iferr(denominator(hm(vnud(n))) == 1, E, 0); \\ Michel Marcus, Oct 28 2018

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

A348964 Exponential harmonic (or e-harmonic) numbers of type 2: numbers k such that the harmonic mean of the exponential divisors of k is an integer.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 47, 51, 53, 55, 57, 58, 59, 60, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 82, 83, 84, 85, 86, 87, 89, 90, 91, 93, 94
Offset: 1

Views

Author

Amiram Eldar, Nov 05 2021

Keywords

Comments

Sándor (2006) proved that all the squarefree numbers are e-harmonic of type 2.
Equivalently, numbers k such that A348963(k) | k * A049419(k).
Apparently, most exponential harmonic numbers of type 1 (A348961) are also terms of this sequence. Those that are not exponential harmonic numbers of type 2 are 1936, 5808, 9680, 13552, 17424, 29040, ...

Examples

			The squarefree numbers are trivial terms. If k is squarefree, then it has a single exponential divisor, k itself, and thus the harmonic mean of its exponential divisors is also k, which is an integer.
12 is a term since its exponential divisors are 6 and 12, and their harmonic mean, 8, is an integer.
		

Crossrefs

A005117 and A348965 are subsequences.
Similar sequences: A001599, A006086, A063947, A286325, A319745.

Programs

  • Mathematica
    f[p_, e_] := p^e * DivisorSigma[0, e] / DivisorSum[e, p^(e-#) &]; ehQ[1] = True; ehQ[n_] := IntegerQ[Times @@ f @@@ FactorInteger[n]]; Select[Range[100], ehQ]

A349026 Exponential unitary harmonic numbers: numbers k such that the harmonic mean of the exponential unitary divisors of k is an integer.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 47, 51, 53, 55, 57, 58, 59, 60, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 82, 83, 84, 85, 86, 87, 89, 90, 91, 93, 94
Offset: 1

Views

Author

Amiram Eldar, Nov 06 2021

Keywords

Comments

First differs from A348964 at n = 102. a(102) = 144 is not an exponential harmonic number of type 2.
The exponential unitary divisors of n = Product p(i)^e(i) are all the numbers of the form Product p(i)^b(i) where b(i) is a unitary divisor of e(i) (see A278908).
Equivalently, numbers k such that A349025(k) | k * A278908(k).

Examples

			The squarefree numbers are trivial terms. If k is squarefree, then it has a single exponential unitary divisor, k itself, and thus the harmonic mean of its exponential unitary divisors is also k, which is an integer.
144 is a term since its exponential unitary divisors are 6, 18, 48 and 144, and their harmonic mean, 16, is an integer.
		

Crossrefs

Cf. A278908 (number of exponential unitary divisors), A322857, A322858, A323310, A349025, A349027.
Similar sequences: A001599, A006086, A063947, A286325, A319745, A348964.

Programs

  • Mathematica
    f[p_, e_] := p^e * 2^PrimeNu[e] / DivisorSum[e, p^(e - #) &, CoprimeQ[#, e/#] &]; euhQ[1] = True; euhQ[n_] := IntegerQ[Times @@ f @@@ FactorInteger[n]]; Select[Range[100], euhQ]

A335268 Numbers that are not powers of primes (A024619) whose harmonic mean of their unitary divisors that are larger than 1 is an integer.

Original entry on oeis.org

6, 15, 20, 24, 28, 30, 45, 60, 72, 90, 91, 96, 100, 112, 153, 216, 220, 240, 264, 272, 325, 352, 360, 364, 378, 496, 703, 765, 780, 816, 832, 1056, 1125, 1170, 1225, 1360, 1431, 1512, 1656, 1760, 1891, 1900, 1984, 2275, 2448, 2520, 2701, 2912, 3024, 3168, 3321
Offset: 1

Views

Author

Amiram Eldar, May 29 2020

Keywords

Comments

Since the unitary divisors of a power of prime (A000961), p^e, are {1, p^e}, they are trivial terms and hence they are excluded from this sequence.
The corresponding harmonic means are 3, 5, 6, 6, 7, 5, 9, 7, 12, 7, 13, 8, 10, 14, 17, ...
Equivalently, numbers m such that omega(m) > 1 and (usigma(m)-m) | m * (2^omega(m)-1), or A063919(m) | (m * A309307(m)), where usigma is the sum of unitary divisors (A034448), and 2^omega(m) = A034444(m) is the number of the unitary divisors of m.
The squarefree terms of A335267 are also terms of this sequence.
The terms with 2 distinct prime divisors are of the form p^e * (2*p^e - 1), when the second factor is also a prime power. The least term which both of its 2 prime divisors are nonunitary (with multiplicity larger than 1) is 1225 = 5^2 * 7^2 = 5^2 * (2 * 5^2 - 1).
The unitary perfect numbers (A002827) are terms of this sequence: if m is a unitary perfect number then usigma(m)-m = m.

Examples

			6 is a term since its unitary divisors other than 1 are 2, 3 and 6, and their harmonic mean, 3/(1/2 + 1/3 + 1/6) = 3, is an integer.
		

Crossrefs

The unitary version of A335267.
A002827 is subsequence.

Programs

  • Mathematica
    usigma[1] = 1; usigma[n_] := Times @@ (1 + Power @@@ FactorInteger[n]); Select[Range[3000], (omega = PrimeNu[#]) > 1 && Divisible[# * (2^omega-1), usigma[#] - #] &]
Showing 1-10 of 25 results. Next