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

A006086 Unitary harmonic numbers (those for which the unitary harmonic mean is an integer).

Original entry on oeis.org

1, 6, 45, 60, 90, 420, 630, 1512, 3780, 5460, 7560, 8190, 9100, 15925, 16632, 27300, 31500, 40950, 46494, 51408, 55125, 64260, 66528, 81900, 87360, 95550, 143640, 163800, 172900, 185976, 232470, 257040, 330750, 332640, 464940, 565488, 598500, 646425, 661500
Offset: 1

Views

Author

Keywords

Comments

Let ud(n) and usigma(n) be number of and sum of unitary divisors of n; then the unitary harmonic mean of the unitary divisors is H(n) = n*ud(n)/usigma(n). - Emeric Deutsch, Dec 22 2004
A103340(a(n)) = 1; A103339(a(n)) = A006087(n). - Reinhard Zumkeller, Mar 17 2012

References

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

Crossrefs

See A006087 for more info.

Programs

  • Haskell
    a006086 n = a006086_list !! (n-1)
    a006086_list = filter ((== 1) . a103340) [1..]
    -- Reinhard Zumkeller, Mar 17 2012
    
  • Mathematica
    ud[n_] := 2^PrimeNu[n]; usigma[n_] := Sum[ If[ GCD[d, n/d] == 1, d, 0], {d, Divisors[n]}]; uhm[n_] := n*ud[n]/usigma[n]; Reap[ Do[ If[ IntegerQ[uhm[n]], Print[n]; Sow[n]], {n, 1, 10^6}]][[2, 1]] (* Jean-François Alcover, May 16 2013 *)
  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d); }
    isok(n) = my(v=udivs(n)); denominator(n*#v/vecsum(v))==1; \\ Michel Marcus, May 07 2017
    
  • PARI
    is(n,f=factor(n))=(n<<(#f~))%sumdivmult([n,f], d, if(gcd(d, n/d)==1, d))==0 \\ Charles R Greathouse IV, Nov 05 2021
    
  • PARI
    list(lim)=my(v=List()); forfactored(n=1,lim\1, if((n[1]<Charles R Greathouse IV, Nov 05 2021

Formula

If m is a term and omega(m) = A001221(m) = k, then m < 2^(k*2^k) (Goto, 2007). - Amiram Eldar, Jun 06 2020

Extensions

More terms from Emeric Deutsch, Dec 22 2004

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)

A361318 Harmonic means of the infinitary divisors of the infinitary harmonic numbers.

Original entry on oeis.org

1, 2, 3, 4, 4, 6, 7, 7, 11, 13, 13, 10, 7, 15, 16, 15, 9, 20, 18, 14, 25, 24, 19, 25, 15, 27, 28, 30, 18, 36, 13, 21, 17, 29, 40, 33, 24, 28, 38, 31, 29, 45, 34, 27, 28, 44, 27, 60, 36, 52, 46, 26, 51, 42, 55, 33, 66, 40, 24, 37, 49, 29, 47, 57, 34, 68, 49, 44
Offset: 1

Views

Author

Amiram Eldar, Mar 09 2023

Keywords

Comments

Each term appears a finite number of times in the sequence (Hagis and Cohen, 1990).

Crossrefs

Similar sequences: A001600, A006087.

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}]]; s[1] = 1; s[n_] := n * Times @@ f @@@ FactorInteger[n]; Select[Array[s, 10^4], IntegerQ]
  • PARI
    ihmean(n) = {my(f = factor(n), b); 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))); };
    lista(kmax) = {my(ih); for(k = 1, kmax, ih = ihmean(k); if(denominator(ih) == 1, print1(ih, ", ")));}

Formula

a(n) = A361316(A063947(n)).

A361384 a(n) is the number of distinct prime factors of the n-th unitary harmonic number.

Original entry on oeis.org

0, 2, 2, 3, 3, 4, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 4, 5, 4, 4, 3, 5, 4, 5, 5, 5, 5, 5, 5, 4, 5, 5, 4, 5, 5, 5, 5, 4, 4, 4, 5, 6, 5, 6, 5, 5, 6, 6, 5, 5, 6, 6, 5, 5, 6, 6, 6, 6, 5, 6, 5, 6, 6, 6, 5, 6, 5, 6, 5, 6, 5, 6, 4, 5, 6, 6, 6, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6
Offset: 1

Views

Author

Amiram Eldar, Mar 10 2023

Keywords

Comments

Each term appears a finite number of times in the sequence (Hagis and Lord, 1975).

Crossrefs

Programs

  • Mathematica
    uh[n_] := n * Times @@ (2/(1 + Power @@@ FactorInteger[n])); uh[1] = 1; PrimeNu[Select[Range[10^6], IntegerQ[uh[#]] &]]
  • 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(omega(k), ", ")));}

Formula

a(n) = A001221(A006086(n)).

A361784 Harmonic means the bi-unitary divisors of the bi-unitary harmonic numbers (A286325).

Original entry on oeis.org

1, 2, 3, 4, 4, 6, 7, 7, 8, 11, 13, 13, 12, 10, 16, 7, 18, 16, 15, 24, 15, 20, 20, 18, 14, 22, 25, 24, 19, 25, 23, 27, 33, 31, 44, 32, 34, 30, 25, 36, 13, 46, 31, 21, 29, 40, 38, 33, 28, 40, 48, 38, 29, 45, 34, 47, 28, 32, 32, 44, 60, 27, 32, 28, 46, 26, 51
Offset: 1

Views

Author

Amiram Eldar, Mar 24 2023

Keywords

Examples

			a(3) = 3 since A286325(3) = 45, the bi-unitary divisors of 45 are 1, 5, 9, and 45, and their harmonic mean is 3.
		

Crossrefs

Similar sequences: A001600, A006087, A361318.

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))]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; Select[Array[s, 10^5], IntegerQ]
  • PARI
    bhmean(n) = {my(f = factor(n), p, e); 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)))); }
    lista(kmax) = {my(bh); for(k = 1, kmax, bh = bhmean(k); if(denominator(bh) == 1, print1(bh, ", "))); }

Formula

a(n) = A361782(A286325(n)).

A361385 a(n) is the number of "Fermi-Dirac prime" factors (or I-components) of the n-th infinitary harmonic number.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Mar 10 2023

Keywords

Comments

Each term appears a finite number of times in the sequence (Hagis and Cohen, 1990).

Crossrefs

Cf. A006086, A006087, A361384 (analogous unitary sequence).

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}]]; ih[1] = 1; ih[n_] := n*Times @@ f @@@ FactorInteger[n]; ic[n_] := Plus @@ (DigitCount[Last /@ FactorInteger[n], 2, 1]); ic[1] = 0; ic /@ Select[Range[10^5], IntegerQ[ih[#]] &]
  • PARI
    A064547(n) = {my(f = factor(n)[, 2]); sum(k=1, #f, hammingweight(f[k])); } \\ Michel Marcus at A064547
    ihmean(n) = {my(f = factor(n), b); 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))); };
    lista(kmax) = {my(ih); for(k = 1, kmax, ih = ihmean(k); if(denominator(ih) == 1, print1(A064547(k), ", ")));}

Formula

a(n) = A064547(A063947(n)).

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]
Showing 1-7 of 7 results.