|
|
A078430
|
|
Sum of gcd(k^2,n) for 1 <= k <= n.
|
|
5
|
|
|
1, 3, 5, 10, 9, 15, 13, 28, 33, 27, 21, 50, 25, 39, 45, 88, 33, 99, 37, 90, 65, 63, 45, 140, 145, 75, 153, 130, 57, 135, 61, 240, 105, 99, 117, 330, 73, 111, 125, 252, 81, 195, 85, 210, 297, 135, 93, 440, 385, 435, 165, 250, 105, 459, 189, 364, 185, 171, 117, 450, 121
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) is the number of non-congruent solutions to x^2*y = 0 mod n. - Yuval Dekel (dekelyuval(AT)hotmail.com), Oct 17 2003
|
|
LINKS
|
|
|
FORMULA
|
a(n) is multiplicative. G.f. for a(p^n), p a prime, is given by (1+(p-1)*x-p^2*x^2)/(1-p*x)/(1-p^3*x^2).
a(n) = n*Sum_{d|n} phi(d)*N(d)/d, where phi is Euler's totient function A000010 and N(n) is sequence A000188. - Laszlo Toth, Apr 15 2012
Multiplicative with a(p^e) = p^(3*e/2) + p^(3*e/2-1) - p^(e-1) if e is even, and 2*p^((3*e-1)/2) - p^(e-1) if e is odd. - Amiram Eldar, Apr 28 2023
|
|
MATHEMATICA
|
Table[Sum[GCD[k^2, n], {k, n}], {n, 70}] (* Harvey P. Dale, Sep 29 2014 *)
f[p_, e_] := If[EvenQ[e], p^(3*e/2) + p^(3*e/2 - 1), 2*p^((3*e - 1)/2)] - p^(e - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 28 2023 *)
|
|
PROG
|
(Haskell)
(PARI) a(n) = sum(k=1, n, gcd(k^2, n)); \\ Michel Marcus, Aug 03 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
mult,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|