A049690 a(n) = Sum_{k=1..n} phi(2*k), where phi = Euler totient function, cf. A000010.
0, 1, 3, 5, 9, 13, 17, 23, 31, 37, 45, 55, 63, 75, 87, 95, 111, 127, 139, 157, 173, 185, 205, 227, 243, 263, 287, 305, 329, 357, 373, 403, 435, 455, 487, 511, 535, 571, 607, 631, 663, 703, 727, 769, 809, 833, 877, 923, 955, 997, 1037, 1069, 1117, 1169, 1205
Offset: 0
Keywords
Links
- Nathaniel Johnston, Table of n, a(n) for n = 0..10000
Programs
-
Maple
A049690 := proc(n) return add(numtheory[phi](2*k), k=1..n): end: seq(A049690(n),n=0..54); # Nathaniel Johnston, May 24 2011
-
Mathematica
A049690[0]:=0; A049690[n_]:=A049690[n-1]+EulerPhi[2n]; Array[A049690,200,0] (* Enrique Pérez Herrero, Feb 25 2012 *)
-
PARI
a(n)=sum(k=1,n,eulerphi(2*k)) \\ Charles R Greathouse IV, Feb 19 2013
-
Python
from sympy import totient def A049690(n): return sum(totient(n) for n in range(1,n+1,2)) + (sum(totient(n) for n in range(2,n+1,2))<<1) # Chai Wah Wu, Aug 04 2024
-
Python
# faster program using program from A002088 and recursive formula def A049690(n): return A002088(n) + A049690(n>>1) if n else 0 # Chai Wah Wu, Aug 04 2024
Formula
a(n) ~ 4*n^2/Pi^2. - Vaclav Kotesovec, Aug 20 2021
a(n) = A002088(n) + a(floor(n/2)). - Chai Wah Wu, Aug 04 2024
Extensions
More terms from Vladeta Jovovic, May 18 2001