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.

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