login
a(n) = Sum_{k=1..n-1} k^2*phi(k) + n^2*phi(n)/2, where phi = A000010.
2

%I #14 Mar 24 2020 15:35:57

%S 3,14,39,105,191,374,649,1020,1463,2268,3161,4463,6065,7553,9477,

%T 12813,16097,20318,25167,29413,34479,42718,50841,59395,69701,80318,

%U 91583,108061,123435,141450,164057,183139,203277,227225,249701,282119,319757,351005,382057,428477,472681,522094,580283,623943,671519

%N a(n) = Sum_{k=1..n-1} k^2*phi(k) + n^2*phi(n)/2, where phi = A000010.

%H Robert Israel, <a href="/A333293/b333293.txt">Table of n, a(n) for n = 2..10000</a>

%p P:= [seq(k^2*numtheory:-phi(k),k=1..100)]:

%p T:= ListTools:-PartialSums(P):

%p seq(T[i-1]+P[i]/2,i=2..100); # _Robert Israel_, Mar 24 2020

%o (PARI) a(n) = sum(k=1, n-1, k^2*eulerphi(k)) + n^2*eulerphi(n)/2; \\ _Michel Marcus_, Mar 23 2020

%Y Cf. A319087, A000010.

%Y Next-to-last diagonal of A333292.

%K nonn

%O 2,1

%A _N. J. A. Sloane_, Mar 23 2020