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 A318305 #21 Feb 03 2024 10:12:49 %S A318305 0,1,1,1,1,4,1,1,1,6,1,4,1,8,7,1,1,4,1,6,9,12,1,4,1,14,1,8,1,22,1,1, %T A318305 13,18,11,4,1,20,15,6,1,30,1,12,7,24,1,4,1,6,19,14,1,4,15,8,21,30,1, %U A318305 22,1,32,9,1,17,46,1,18,25,46,1,4,1,38,7,20,17,54,1,6,1,42,1,30,21,44,31,12,1,22,19,24,33,48,23,4,1,8 %N A318305 a(n) = Product_{primes p dividing n} p - Product_{primes p dividing n} (p-1). %H A318305 Antti Karttunen, <a href="/A318305/b318305.txt">Table of n, a(n) for n = 1..16384</a> %F A318305 a(n) = A051953(n)/A003557(n) = A007947(n) - A173557(n) = A173557(n) - A318304(n). %e A318305 For n = 45 = 3^2 * 5, the prime factors are 3 and 5, thus a(45) = (3*5) - (2*4) = 15 - 8 = 7. %e A318305 Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = A065463 - A307868 = 0.232761... . - _Amiram Eldar_, Dec 07 2023 %o A318305 (PARI) %o A318305 A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); }; \\ From A003557 %o A318305 A051953(n) = (n - eulerphi(n)); %o A318305 A318305(n) = A051953(n)/A003557(n); %o A318305 (PARI) %o A318305 A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947 %o A318305 A173557(n) = my(f=factor(n)[, 1]); prod(k=1, #f, f[k]-1); \\ From A173557 %o A318305 A318305(n) = (A007947(n) - A173557(n)); %Y A318305 Cf. A003557, A007947, A051953, A083254, A173557, A318304. %Y A318305 Cf. A065463, A307868. %K A318305 nonn %O A318305 1,6 %A A318305 _Antti Karttunen_, Aug 26 2018 %E A318305 Corrected the notation in the definition - _Antti Karttunen_, Feb 03 2024