login
A049690
a(n) = Sum_{k=1..n} phi(2*k), where phi = Euler totient function, cf. A000010.
15
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,3
LINKS
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
def A049690(n): return A002088(n) + A049690(n>>1) if n else 0 # Chai Wah Wu, Aug 04 2024
CROSSREFS
a(n)=b(2n), where b=A049689. Bisections: A099958, A190815.
Cf. A062570.
Sequence in context: A185170 A211340 A061571 * A080075 A007664 A215812
KEYWORD
nonn
EXTENSIONS
More terms from Vladeta Jovovic, May 18 2001
STATUS
approved