OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
Project Euler, Problem 351: Hexagonal orchards.
FORMULA
a(n) = 6 * (C(n+1,2) - Sum_{i=1..n} phi(i)). - corrected by Piyush Kumar and Robert Israel, Aug 26 2014
MATHEMATICA
Table[6*Sum[k - EulerPhi[k], {k, n}], {n, 100}] (* Jon Maiga, Jan 12 2019 *)
PROG
(PARI) for(i=1, 100, print1(6*(binomial(i+1, 2)-sum(X=1, i, eulerphi(X))), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
V. Raman, Sep 07 2012
STATUS
approved