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.
%I A047994 #83 May 22 2025 06:55:20 %S A047994 1,1,2,3,4,2,6,7,8,4,10,6,12,6,8,15,16,8,18,12,12,10,22,14,24,12,26, %T A047994 18,28,8,30,31,20,16,24,24,36,18,24,28,40,12,42,30,32,22,46,30,48,24, %U A047994 32,36,52,26,40,42,36,28,58,24,60,30,48,63,48,20,66,48,44,24,70 %N A047994 Unitary totient (or unitary phi) function uphi(n). %C A047994 A divisor d of n is called a unitary divisor if gcd(d, n/d) = 1. Define gcd*(k,n) to be the largest divisor d of k that is also a unitary divisor of n (that is, such that gcd(d, n/d) = 1). The unitary totient function a(n) = number of k with 1 <= k <= n such that gcd*(k,n) = 1. - _N. J. A. Sloane_, Aug 08 2021 %C A047994 Unitary convolution of A076479 and A000027. - _R. J. Mathar_, Apr 13 2011 %C A047994 Multiplicative with a(p^e) = p^e - 1. - _N. J. A. Sloane_, Apr 30 2013 %H A047994 T. D. Noe, <a href="/A047994/b047994.txt">Table of n, a(n) for n = 1..10000</a> %H A047994 Eckford Cohen, <a href="http://dx.doi.org/10.1007/BF01180473">Arithmetical functions associated with the unitary divisors of an integer</a>, Math. Zeitschr. 74 (1960) 66-80 %H A047994 Steven R. Finch, <a href="http://www.people.fas.harvard.edu/~sfinch/">Unitarism and infinitarism</a>. %H A047994 Steven R. Finch, <a href="/A007947/a007947.pdf">Unitarism and Infinitarism</a>, February 25, 2004. [Cached copy, with permission of the author] %H A047994 M. Lal, <a href="http://dx.doi.org/10.1090/S0025-5718-1974-0335419-3">Iterates of the unitary totient function</a>, Math. Comp., 28 (1974), 301-302. %H A047994 R. J. Mathar, <a href="http://arxiv.org/abs/1106.4038">Survey of Dirichlet Series of Multiplicative Arithmetic Functions</a>, arXiv:1106.4038 [math.NT], 2011, Remark 43. %H A047994 László Tóth, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL12/Toth2/toth5.html">On the Bi-Unitary Analogues of Euler's Arithmetical Function and the Gcd-Sum Function</a>, JIS 12 (2009), Article 09.5.2. %H A047994 László Tóth, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Toth/toth10.html">A survey of gcd-sum functions</a>, J. Int. Seq. 13 (2010), Article 10.8.1. %F A047994 If n = Product p_i^e_i, uphi(n) = Product (p_i^e_i - 1). %F A047994 a(n) = A000010(n)*A000203(A003557(n))/A003557(n). - _Velin Yanev_ and _Charles R Greathouse IV_, Aug 23 2017 %F A047994 From _Amiram Eldar_, May 29 2020: (Start) %F A047994 a(n) = Sum_{d|n, gcd(d, n/d) = 1} (-1)^omega(d) * n/d. %F A047994 Sum_{d|n, gcd(d, n/d) = 1} a(d) = n. %F A047994 a(n) >= phi(n) = A000010(n), with equality if and only if n is squarefree (A005117). (End) %F A047994 Sum_{k=1..n} a(k) ~ c * Pi^2 * n^2 / 12, where c = A065464 = Product_{primes p} (1 - 2/p^2 + 1/p^3). - _Vaclav Kotesovec_, Jun 15 2020 %F A047994 Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{p prime} (1 - 2/p^s + 1/p^(2*s-1)). - _Amiram Eldar_, May 22 2025 %e A047994 a(12) = a(3)*a(4) = 2*3 = 6. %p A047994 A047994 := proc(n) %p A047994 local a, f; %p A047994 a := 1 ; %p A047994 for f in ifactors(n)[2] do %p A047994 a := a*(op(1,f)^op(2,f)-1) ; %p A047994 end do: %p A047994 a ; %p A047994 end proc: %p A047994 seq(A047994(n),n=1..20) ; # _R. J. Mathar_, Dec 22 2011 %t A047994 uphi[n_] := (Times @@ (Table[ #[[1]]^ #[[2]] - 1, {1} ] & /@ FactorInteger[n]))[[1]]; Table[ uphi[n], {n, 2, 75}] (* _Robert G. Wilson v_, Sep 06 2004 *) %t A047994 uphi[n_] := If[n==1, 1, Product[{p, e} = pe; p^e-1, {pe, FactorInteger[n]}] ]; Array[uphi, 80] (* _Jean-François Alcover_, Nov 17 2018 *) %o A047994 (PARI) A047994(n)=my(f=factor(n)~); prod(i=1, #f, f[1, i]^f[2, i]-1); %o A047994 (PARI) for(n=1, 100, print1(direuler(p=2, n, (1 - 2*X + p*X^2)/(1-X)/(1-p*X))[n], ", ")) \\ _Vaclav Kotesovec_, Jun 15 2020 %o A047994 (Haskell) %o A047994 a047994 n = f n 1 where %o A047994 f 1 uph = uph %o A047994 f x uph = f (x `div` sppf) (uph * (sppf - 1)) where sppf = a028233 x %o A047994 -- _Reinhard Zumkeller_, Aug 17 2011 %o A047994 (Python) %o A047994 from math import prod %o A047994 from sympy import factorint %o A047994 def A047994(n): return prod(p**e-1 for p, e in factorint(n).items()) # _Chai Wah Wu_, Sep 24 2021 %Y A047994 Cf. A000010, A000203, A001221, A003557, A049865, A003271, A028233, A076479. %K A047994 nonn,easy,nice,mult %O A047994 1,3 %A A047994 _N. J. A. Sloane_ %E A047994 More terms from _Jud McCranie_