This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A368736 #17 Jan 12 2024 22:26:39 %S A368736 1,2,5,4,9,10,13,8,21,18,21,20,25,26,45,16,33,42,37,36,65,42,45,40,65, %T A368736 50,81,52,57,90,61,32,105,66,117,84,73,74,125,72,81,130,85,84,189,90, %U A368736 93,80,133,130,165,100,105,162,189,104,185,114,117,180,121,122,273,64,225,210,133,132,225,234 %N A368736 a(n) = Sum_{k = 1..n} gcd(2*k+1, n). %F A368736 a(2*n) = 2*a(n); a(2*n+1) = A018804(2*n+1) = A344372(2*n+1). %F A368736 a(n) = Sum_{k = 1..n} gcd(4*k+1, n) = Sum_{k = 1..n} gcd(4*k+3, n). %F A368736 a(n) = Sum_{d divides n} X(d)*phi(d)*n/d, where phi(n) = A000010(n) and X(n) = 1 if n is odd, else 0, that is, X(n) is the principal Dirichlet character of the reduced residue system mod 2. See A000035. %F A368736 Multiplicative: a(2^k) = 2^k and for odd prime p, a(p^e) = (e + 1)*p^e - e*p^(e-1). %F A368736 Dirichlet g.f.: (1 - 2/2^s)/(1 - 1/2^s) * zeta(s-1)^2/zeta(s). %F A368736 Sum_{k=1..n} a(k) ~ n^2*(2*log(n) - 1 + 4*gamma + 4*log(2)/3 - 12*zeta'(2)/Pi^2) / Pi^2, where gamma is the Euler-Mascheroni constant A001620. - _Vaclav Kotesovec_, Jan 11 2024 %p A368736 seq(add(gcd(2*k+1, n), k = 1..n), n = 1..70); %p A368736 # alternative faster program for large n %p A368736 with(numtheory): seq(add(irem(d,2)*phi(d)*n/d, d in divisors(n)), n = 1..70); %t A368736 Table[Sum[GCD[2*k + 1, n], {k, 1, n}], {n, 1, 100}] (* _Vaclav Kotesovec_, Jan 11 2024 *) %o A368736 (PARI) a(n) = sum(k = 1, n, gcd(2*k+1, n)); \\ _Michel Marcus_, Jan 11 2024 %Y A368736 CF. A000010, A018804, A344372, A368737 - A368742. %K A368736 nonn,mult,easy %O A368736 1,2 %A A368736 _Peter Bala_, Jan 04 2024