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 A063754 #37 Jan 11 2024 01:47:11 %S A063754 0,1,1,3,1,7,1,8,5,11,1,20,1,15,13,20,1,31,1,32,17,23,1,52,9,27,21,44, %T A063754 1,71,1,48,25,35,21,88,1,39,29,84,1,99,1,68,61,47,1,128,13,83,37,80,1, %U A063754 123,29,116,41,59,1,200,1,63,81,112,33,155,1,104,49,159,1,228,1,75,101 %N A063754 Dirichlet convolution of totient and cototient. %C A063754 a(n) = 1 if and only if n is prime. - _Robert Israel_, Feb 04 2018 %C A063754 a(n) = n+1 if and only if n = 2*p with p an odd prime (A100484 \ {4}). - _Bernard Schott_, Jun 19 2023 %H A063754 Robert Israel, <a href="/A063754/b063754.txt">Table of n, a(n) for n = 1..10000</a> %F A063754 a(n) = Sum_{d|n} A000010(d)*A051953(n/d). %F A063754 From _Richard L. Ollerton_, May 06 2021: (Start) %F A063754 a(n) = Sum_{k=1..n} A051953(gcd(n,k)). %F A063754 a(n) = Sum_{k=1..n} A051953(n/gcd(n,k))*A000010(gcd(n,k))/A000010(n/gcd(n,k)). %F A063754 a(n) = A018804(n) - A029935(n). (End) %F A063754 Sum_{k=1..n} a(k) ~ (1/(2*zeta(2)))*(1 - 1/zeta(2)) * n^2 * (log(n) + 2*gamma - 1/2 - ((zeta(2)-2)/(zeta(2)-1))*(zeta'(2)/zeta(2))), where gamma is Euler's constant (A001620). - _Amiram Eldar_, Jan 11 2024 %e A063754 n = 24: divisors = {1, 2, 3, 4, 6, 8, 12, 24}, d-phi(d) = {0, 1, 1, 2, 4, 4, 8, 16}, phi(n/d) = {8, 4, 4, 2, 2, 2, 1, 1}, products = {0, 4, 4, 4, 8, 8, 8, 16}, a(24) = 52. %p A063754 f:= n -> add(numtheory:-phi(d)*(n/d - numtheory:-phi(n/d)), d=numtheory:-divisors(n)): %p A063754 map(f, [$1..100]); # _Robert Israel_, Feb 04 2018 %t A063754 f1[p_, e_] := (e*(p - 1)/p + 1)*p^e; f2[p_, e_] := (e+1)*(p^e - p^(e-1)) - (e-1)*(p^(e-1) - p^(e-2)); a[n_] := Times @@ f1 @@@ (fct = FactorInteger[n]) - Times @@ f2 @@@ fct; a[1] = 0; Array[a, 100] (* _Amiram Eldar_, Apr 28 2023 *) %o A063754 (PARI) a(n) = sumdiv(n, d, eulerphi(d)*(n/d - eulerphi(n/d))); \\ _Michel Marcus_, Feb 05 2018 %Y A063754 Cf. A000010, A018804, A029935, A051953, A100484. %Y A063754 Cf. A001620, A013661, A306016. %K A063754 easy,nonn,look %O A063754 1,4 %A A063754 _Labos Elemer_, Aug 14 2001 %E A063754 Offset corrected by _Robert Israel_, Feb 04 2018