# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a122411 Showing 1-1 of 1 %I A122411 #32 Oct 10 2023 16:24:51 %S A122411 0,2,3,4,5,7,7,8,9,13,11,14,13,19,22,16,17,21,19,26,32,31,23,28,25,37, %T A122411 27,38,29,38,31,32,52,49,58,42,37,55,62,52,41,56,43,62,66,67,47,56,49, %U A122411 65,82,74,53,63,94,76,92,85,59,76,61,91,96,64,112,92,67,98,112,106,71 %N A122411 a(n) is the sum of primes p for those k's, 2 <= k <= n, where gcd(k,n) = p^j > 1. (a(1) = 0.) %H A122411 Antti Karttunen, Table of n, a(n) for n = 1..65537 %F A122411 a(n) = phi(n) * Sum_{p|n} p/(p-1), where p is prime. - _Ridouane Oudra_, Feb 03 2023 %F A122411 a(n) = Sum_{d|n, d is a prime power} A020639(d)*phi(n/d). - _Ridouane Oudra_, Feb 13 2023 %F A122411 a(n) = Sum_{p|n, p prime} p^v(n,p)*phi(n/p^v(n,p)), where p^v(n,p) is the highest power of p dividing n. - _Ridouane Oudra_, Oct 06 2023 %e A122411 The integers k, 2 <= k <= 12, where gcd(k,12) is a power of a prime are 2,3,4,8,9 and 10. gcd(2,12) = 2^1, gcd(3,12) = 3^1, gcd(4,12) = 2^2, gcd(8, 12) = 2^2, gcd(9,12) = 3^1 and gcd(10,12) = 2^1. The sum of the prime bases of the prime-powers is 2+3+2+2+3+2 = 14. So a(12) = 14. %p A122411 with(numtheory): a:= proc(n) local k, m := 0; for k from 2 to n do if nops(factorset(gcd(n, k))) = 1 then m:= m + factorset(gcd(n, k))[1]; end if; end do; return m; end proc: seq(a(n), n=1..80); # _Ridouane Oudra_, Feb 03 2023 %t A122411 f[n_] := Plus @@ First /@ Flatten[Select[FactorInteger[GCD[Range[n], n]], Length[ # ] == 1 &], 1]; Table[f[n], {n, 80}] (* _Ray Chandler_, Sep 06 2006 *) %o A122411 (PARI) A122411(n) = { my(p=0); sum(k=2,n,if(isprimepower(gcd(n,k),&p),p,0)); }; \\ _Antti Karttunen_, Feb 25 2018 %Y A122411 Cf. A122410. %K A122411 nonn %O A122411 1,2 %A A122411 _Leroy Quet_, Sep 02 2006 %E A122411 Corrected and extended by _Ray Chandler_, Sep 06 2006 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE