OFFSET
2,1
LINKS
Heinrich Ludwig, Table of n, a(n) for n = 2..1000
FORMULA
a(n) = 3*sum(j = 1..n-1, euler_phi(j)*(g(n-j)-g(n-2*j))), where g(i) = i*(i+1)/2 if i > 0, otherwise 0, after Jon E. Schoenfield.
MATHEMATICA
g[i_]:=If[i>0, i*(i+1)/2, 0]; Table[3*Sum[EulerPhi[j]*(g[n-j]-g[n-2*j]), {j, 1, n-1}], {n, 2, 50}] (* Vaclav Kotesovec, Sep 04 2014 after Jon E. Schoenfield *)
PROG
(PARI) g(j) = if (j > 0, j*(j+1)/2, 0);
a(n) = 3*sum(j = 1, n-1, eulerphi(j)*(g(n-j)-g(n-2*j))); \\ Michel Marcus, Sep 04 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Heinrich Ludwig, Sep 04 2014
STATUS
approved