A127415 a(n) = Sum_{1<=k<=n, gcd(k,n)=1}, A000217(k).
1, 1, 4, 7, 20, 16, 56, 50, 93, 80, 220, 110, 364, 224, 340, 372, 816, 354, 1140, 580, 966, 880, 2024, 820, 2200, 1456, 2304, 1666, 4060, 1240, 4960, 2856, 3850, 3264, 5180, 2706, 8436, 4560, 6396, 4440, 11480, 3612, 13244, 6710, 8400, 8096, 17296, 6344, 17297, 8600
Offset: 1
Examples
a(6) = 16 since the relative primes of 6 are 1 and 5 and (1 + 15) = 16. a(6) = (6/(3!*2))*(15*6 + 1*6)*(1/2)*(2/3)= 16.
References
- T. Apostol, Introduction to Analytic Number Theory, Springer, 1986.
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
rad[n_] := Times @@ (FactorInteger[n][[ All, 1]]); a[n_] := (n/(3!*2))*((2*n+3)*n + MoebiusMu[ rad[n]]*rad[n])*(EulerPhi[n] / n); a[1] = 1; Table[ a[n], {n, 1, 33}] (* Jean-François Alcover, Oct 03 2011 *)
-
PARI
a(n)=if(n<3,return(1));my(s=factor(n)[,1]); s=prod(i=1,#s,s[i]); (n/12)*((2*n+3)*n + moebius(s)*s)*(eulerphi(n)/n) \\ Charles R Greathouse IV, May 17 2011
-
PARI
a(n) = sum(k=1, n, if (gcd(n,k)==1, k*(k+1)/2)); \\ Michel Marcus, Feb 01 2016
Formula
From Wolfdieter Lang, May 17 2011: (Start)
a(n) = (n/(3!*2))*((2*n+3)*n + mu(rad(n))*rad(n))*(phi(n)/n), n >= 2, with rad(n) the squarefree kernel of n (the largest squarefree number dividing n, see A007947), the Moebius function mu(n)=A008683(n), and the Euler totient function phi(n)= A000010(n).
Proof via inclusion-exclusion.
(End)
Extensions
More terms and formula from Wolfdieter Lang, May 17 2011
More terms from Michel Marcus, Feb 01 2016
Comments