A053818 a(n) = Sum_{k=1..n, gcd(n,k) = 1} k^2.
1, 1, 5, 10, 30, 26, 91, 84, 159, 140, 385, 196, 650, 406, 620, 680, 1496, 654, 2109, 1080, 1806, 1650, 3795, 1544, 4150, 2756, 4365, 3164, 7714, 2360, 9455, 5456, 7370, 6256, 9940, 5196, 16206, 8778, 12324, 8560, 22140, 6972, 25585
Offset: 1
Keywords
References
- Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 15, the function phi_2(n).
- Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 199, #2.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..2500
- John D. Baum, A Number-Theoretic Sum, Mathematics Magazine 55.2 (1982): 111-113.
- P. G. Brown, Some comments on inverse arithmetic functions, Math. Gaz. 89 (516) (2005) 403-408.
- Geoffrey B. Campbell, Dirichlet summations and products over primes, Int. J. Math. Math. Sci. 16 92) (1993) 359. eq. (3.1)
- Constantin M. Petridi, The Sums of the k-powers of the Euler set and their connection with Artin's conjecture for primitive roots, arXiv:1612.07632 [math.NT], 2016-2018.
Crossrefs
Programs
-
Maple
A053818 := proc(n) local a,k; a := 0 ; for k from 1 to n do if igcd(k,n) = 1 then a := a+k^2 ; end if; end do: a ; end proc: # R. J. Mathar, Sep 26 2013
-
Mathematica
a[n_] := Plus @@ (Select[ Range@n, GCD[ #, n] == 1 &]^2); Array[a, 43] (* Robert G. Wilson v, Jul 01 2010 *) a[1] = 1; a[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; (n^2/3) * Times @@ ((p - 1)*p^(e - 1)) + (n/6) * Times @@ (1 - p)]; Array[a, 100] (* Amiram Eldar, Dec 03 2023 *)
-
PARI
a(n) = sum(k=1, n, k^2*(gcd(n,k) == 1)); \\ Michel Marcus, Jan 30 2016
-
PARI
a(n) = {my(f = factor(n)); if(n == 1, 1, (n^2/3) * eulerphi(f) + (n/6) * prod(i = 1, #f~, 1 - f[i, 1]));} \\ Amiram Eldar, Dec 03 2023
Formula
If n = p_1^e_1 * ... *p_r^e_r then a(n) = n^2*phi(n)/3 + (-1)^r*p_1*..._p_r*phi(n)/6.
a(n) = (A000010(n)/3) * (n^2 + (-1)^A001221(n)*A007947(n)/2) for n>=2. - Jaroslav Krizek, Aug 24 2010
G.f. A(x) satisfies: A(x) = x*(1 + x)/(1 - x)^4 - Sum_{k>=2} k^2 * A(x^k). - Ilya Gutkovskiy, Mar 29 2020
Sum_{k=1..n} a(k) ~ n^4 / (2*Pi^2). - Amiram Eldar, Dec 03 2023
Comments