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 A053158 #25 Feb 12 2024 01:55:34 %S A053158 1,3,4,6,6,10,8,12,12,16,12,20,14,22,22,24,18,30,20,32,30,34,24,40,30, %T A053158 40,36,44,30,52,32,48,46,52,46,60,38,58,54,64,42,72,44,68,66,70,48,80, %U A053158 56,80,70,80,54,90,70,88,78,88,60,104,62,94,90,96,82,112,68,104,94,116 %N A053158 Sum of n and its cototient function value (A051953): a(n) = 2*n - phi(n), where phi is Euler phi. %C A053158 For Mersenne primes and also for certain composites the values of this function are powers of 2. %H A053158 Antti Karttunen, <a href="/A053158/b053158.txt">Table of n, a(n) for n = 1..20000</a> %F A053158 a(n) = n + A051953(n) = 2n - phi(n), where phi is A000010. %F A053158 a(2^k) = 3*2^(k-1). %F A053158 Sum_{k=1..n} a(k) = c * n^2 + O(n*log(n)), where c = 1 - 3/Pi^2 = 0.696036... . - _Amiram Eldar_, Dec 16 2023 %e A053158 a(127) = 254 - 126 = 128. %e A053158 a(80) = 160 - 32 = 128. %t A053158 a[n_] := 2*n - EulerPhi[n]; Array[a, 60] (* _Amiram Eldar_, Dec 16 2023 *) %o A053158 (PARI) a(n) = 2*n - eulerphi(n); \\ _Michel Marcus_, Dec 19 2013 %o A053158 (Magma) [2*n - EulerPhi(n): n in [1..100]]; // _G. C. Greubel_, Feb 12 2024 %o A053158 (SageMath) [2*n - euler_phi(n) for n in range(1,101)] # _G. C. Greubel_, Feb 12 2024 %Y A053158 Cf. A000010, A000043, A000668, A001368, A051953, A104141. %K A053158 nonn,easy %O A053158 1,2 %A A053158 _Labos Elemer_, Feb 29 2000 %E A053158 Name amended with formula by _Antti Karttunen_, Nov 15 2021