%I #31 Aug 04 2024 20:35:58
%S 0,1,3,5,9,13,17,23,31,37,45,55,63,75,87,95,111,127,139,157,173,185,
%T 205,227,243,263,287,305,329,357,373,403,435,455,487,511,535,571,607,
%U 631,663,703,727,769,809,833,877,923,955,997,1037,1069,1117,1169,1205
%N a(n) = Sum_{k=1..n} phi(2*k), where phi = Euler totient function, cf. A000010.
%H Nathaniel Johnston, <a href="/A049690/b049690.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) ~ 4*n^2/Pi^2. - _Vaclav Kotesovec_, Aug 20 2021
%F a(n) = A002088(n) + a(floor(n/2)). - _Chai Wah Wu_, Aug 04 2024
%p A049690 := proc(n) return add(numtheory[phi](2*k), k=1..n): end: seq(A049690(n),n=0..54); # _Nathaniel Johnston_, May 24 2011
%t A049690[0]:=0; A049690[n_]:=A049690[n-1]+EulerPhi[2n]; Array[A049690,200,0] (* _Enrique PĂ©rez Herrero_, Feb 25 2012 *)
%o (PARI) a(n)=sum(k=1,n,eulerphi(2*k)) \\ _Charles R Greathouse IV_, Feb 19 2013
%o (Python)
%o from sympy import totient
%o 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
%o (Python)
%o # faster program using program from A002088 and recursive formula
%o def A049690(n): return A002088(n) + A049690(n>>1) if n else 0 # _Chai Wah Wu_, Aug 04 2024
%Y a(n)=b(2n), where b=A049689. Bisections: A099958, A190815.
%Y Cf. A062570.
%K nonn
%O 0,3
%A _Clark Kimberling_
%E More terms from _Vladeta Jovovic_, May 18 2001
|