OFFSET
1,2
COMMENTS
Sum of the GCD's of the smallest and largest parts in the partitions of 2n into exactly two parts.
LINKS
FORMULA
a(n) = Sum_{i=1..n} gcd(2*n-i, i).
a(n) = (A018804(2*n)-n)/2. - Sebastian Karlsson, Oct 03 2021
Conjecture: a(n) = (1/4)*Sum_{k = 1..4*n} (-1)^k *gcd(k, 8*n). - Peter Bala, Jan 01 2024
Sum_{k=1..n} a(k) ~ (Pi^2/4)*n^2 * (log(n) + 2*gamma - 1/2 + log(2)/6 - Pi^2/16 - zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). - Amiram Eldar, Mar 30 2024
EXAMPLE
a(6) = 17; the partitions of 2(6) = 12 into two parts are: (11,1),(10,2),(9,3),(8,4),(7,5),(6,6). Then a(6) = gcd(11,1) + gcd(10,2) + gcd(9,3) + gcd(8,4) + gcd(7,5) + gcd(6,6) = 1 + 2 + 3 + 4 + 1 + 6 = 17.
MATHEMATICA
Table[Sum[GCD[2n - i, i], {i, n}], {n, 100}]
f[p_, e_] := (e*(p - 1)/p + 1)*p^e; a[n_] := (Times @@ f @@@ FactorInteger[2*n] - n)/2; Array[a, 100] (* Amiram Eldar, Apr 28 2023 *)
PROG
(PARI) a(n) = sum(i=1, n, gcd(i, 2*n-i)); \\ Michel Marcus, Dec 23 2013
(PARI) a(n) = {my(f = factor(2*n)); (prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; p^(e-1)*(p+e*(p-1))) - n)/2; } \\ Amiram Eldar, Mar 30 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Dec 22 2013
STATUS
approved