The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A368742 a(n) = Sum_{k = 1..n} gcd(6*k, n). 6
1, 4, 9, 12, 9, 36, 13, 32, 45, 36, 21, 108, 25, 52, 81, 80, 33, 180, 37, 108, 117, 84, 45, 288, 65, 100, 189, 156, 57, 324, 61, 192, 189, 132, 117, 540, 73, 148, 225, 288, 81, 468, 85, 252, 405, 180, 93, 720, 133, 260, 297, 300, 105, 756, 189, 416, 333, 228, 117, 972, 121, 244, 585, 448 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) equals the number of solutions to the congruence 6*x*y == 0 (mod n) for 1 <= x, y <= n.
LINKS
FORMULA
a(6*n) = 36*A018804(n); a(6*n+2) = 4*A018804(3*n+1);
a(6*n+3) = 9*A018804(2*n+1); a(6*n+4) = 4*A018804(3*n+2);
a(6*n+r) = A018804(6*n+r) for r = 1 and 5.
Define a_m(n) = Sum_{k = 1..n} gcd(m*k, n). Then
a(n) = a_2(n) * a_3(n) / a_1(n) = A344372(n) * A368737(n) / A018804(n).
a(n) = Sum_{d divides n} gcd(6, d)*phi(d)*n/d, where phi(n) = A000010(n).
Multiplicative: a(2^k) = (k + 1)*2^k, a(3^k) = (2*k + 1)*3^k, and for prime p > 3, a(p^k) = (k + 1)*p^k - k*p^(k-1).
Dirichlet g.f.: ( 1 + 3/3^s)/((1 - 1/2^s)*(1 - 1/3^s)) * zeta(s-1)^2/zeta(s).
Sum_{k=1..n} a(k) ~ n^2 * (6*log(n) - 3 + 12*gamma - 2*log(2) - 9*log(3)/4 - 36*zeta'(2)/Pi^2) / Pi^2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 12 2024
EXAMPLE
a(4) = 12: each of the 16 pairs (x, y), 1 <= x, y <= 4, is a solution to the congruence 6*x*y == 0 (mod 4) except for the 4 pairs (1, 1) , (1, 3), (3, 1) and (3, 3) with both x and y odd.
MAPLE
seq(add(gcd(6*k, n), k = 1..n), n = 1..70);
# alternative faster program for large n
with(numtheory): seq(add(gcd(6, d)*phi(d)*n/d, d in divisors(n)), n = 1..70);
MATHEMATICA
Table[Sum[GCD[6*k, n], {k, 1, n}], {n, 1, 100}] (* Vaclav Kotesovec, Jan 12 2024 *)
CROSSREFS
Sequence in context: A106854 A099458 A069219 * A312848 A010413 A112652
KEYWORD
nonn,mult,easy
AUTHOR
Peter Bala, Jan 08 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 22 21:38 EDT 2024. Contains 372758 sequences. (Running on oeis4.)