OFFSET
0,3
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 0..10000
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
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Vladeta Jovovic, May 18 2001
STATUS
approved