A103116 a(n) = Sum_{i=1..n} (n-i+1)*phi(i).
0, 1, 3, 7, 13, 23, 35, 53, 75, 103, 135, 177, 223, 281, 345, 417, 497, 593, 695, 815, 943, 1083, 1233, 1405, 1585, 1785, 1997, 2227, 2469, 2739, 3017, 3325, 3649, 3993, 4353, 4737, 5133, 5565, 6015, 6489, 6979, 7509, 8051, 8635, 9239, 9867, 10517, 11213, 11925
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
Programs
-
Magma
A103116:= func< n | n eq 0 select 0 else (&+[(n-j+1)*EulerPhi(j): j in [1..n]]) >; [A103116(n): n in [0..60]]; // G. C. Greubel, Dec 08 2022
-
Maple
b:= proc(n) option remember; `if`(n<1, [0$2], (p-> p+[numtheory[phi](n), p[1]])(b(n-1))) end: a:= n-> b(n+1)[2]: seq(a(n), n=0..55); # Alois P. Heinz, Oct 07 2021
-
Mathematica
Accumulate@Accumulate@EulerPhi@Range[0,100] (* Vladimir Joseph Stephan Orlovsky, Apr 21 2011 *)
-
SageMath
@CachedFunction def A103116(n): return sum( (n-j+1)*euler_phi(j) for j in range(1, n+1) ) [A103116(n) for n in range(61)] # G. C. Greubel, Dec 08 2022
Formula
a(n) = A005598(n) - 1.
G.f.: (1/(1 - x)^2)*Sum_{k>=1} mu(k)*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Mar 16 2017