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.

A103339 Numerator of the unitary harmonic mean (i.e., the harmonic mean of the unitary divisors) of the positive integer n.

This page as a plain text file.
%I A103339 #29 Mar 10 2023 09:10:01
%S A103339 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,
%T A103339 14,29,10,31,64,11,68,35,72,37,38,39,80,41,7,43,44,3,23,47,48,49,100,
%U A103339 17,104,53,18,55,28,57,116,59,4,61,31,63,128,65,11,67,136,23,35,71,16,73
%N A103339 Numerator of the unitary harmonic mean (i.e., the harmonic mean of the unitary divisors) of the positive integer n.
%H A103339 Reinhard Zumkeller, <a href="/A103339/b103339.txt">Table of n, a(n) for n = 1..10000</a>
%F A103339 a(A006086(n)) = A006087(n). - _Reinhard Zumkeller_, Mar 17 2012
%F A103339 From _Amiram Eldar_, Mar 10 2023: (Start)
%F A103339 a(n)/A103340(n) = n*A034444(n)/A034448(n).
%F A103339 a(n)/A103340(n) <= A099377(n)/A099378(n), with equality if and only if n is squarefree (A005117). (End)
%e A103339 1, 4/3, 3/2, 8/5, 5/3, 2, ...
%e A103339 a(8) = 16 because the unitary divisors of 8 are {1,8} and 2/(1/1 + 1/8) = 16/9.
%p A103339 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);
%t A103339 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 *)
%t A103339 a[n_] := Numerator[n * Times @@ (2 / (1 + Power @@@ FactorInteger[n]))]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Mar 10 2023 *)
%o A103339 (Haskell)
%o A103339 import Data.Ratio ((%), numerator)
%o A103339 a103339 = numerator . uhm where uhm n = (n * a034444 n) % (a034448 n)
%o A103339 -- _Reinhard Zumkeller_, Mar 17 2012
%o A103339 (Python)
%o A103339 from sympy import gcd
%o A103339 from sympy.ntheory.factor_ import udivisor_sigma
%o A103339 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
%o A103339 (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
%Y A103339 Cf. A103340 (denominators), A099377, A099378.
%Y A103339 Cf. A005117, A034444, A034448, A077610.
%K A103339 frac,nonn
%O A103339 1,2
%A A103339 _Emeric Deutsch_, Jan 31 2005