STATUS
proposed
approved
proposed
approved
editing
proposed
return 3*(n*(n-1)-c+j)//2 - 1 # Chai Wah Wu, Mar 25 2021
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A278049(n): # based on second formula in A018805
if n == 0:
return -1
c, j = 0, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c += (j2-j)*(2*A278049(k1)-1)//3
j, k1 = j2, n//j2
return 3*(n*(n-1)-c+j)//2 - 1 # Chai Wah Wu, Mar 25 2021
approved
editing
proposed
approved
editing
proposed
G.f.: (1/(1 - x)) * (-x + 3 * Sum_{k>=1} mu(k) * x^k / (1 - x^k)^2). - Ilya Gutkovskiy, Feb 14 2020
approved
editing
proposed
approved
editing
proposed
Table[3 Sum[EulerPhi@ k, {k, n}] - 1, {n, 57}] (* Michael De Vlieger, Dec 16 2016 *)
proposed
editing