OFFSET
0,4
LINKS
Robert P. P. McKone, Table of n, a(n) for n = 0..14143
FORMULA
a(n) = A023896(n) - 1. - Joerg Arndt, Mar 08 2013
G.f.: -x/(1 - x) + Sum_{k>=1} mu(k)*k*x^k/(1 - x^k)^3. - Ilya Gutkovskiy, May 28 2019
EXAMPLE
a(9) = 26 because 2,4,5,7,8 are coprime to 9 and 2+4+5+7+8 = 26.
MATHEMATICA
a[n_] := Total@Select[Range[2, n], CoprimeQ[n, #] &]; Table[a[n], {n, 0, 57}] (* Robert P. P. McKone, Nov 12 2023 *)
PROG
(PARI) a(n) = sum(i=2, n-1, i*(gcd(i, n)==1)); \\ Michel Marcus, Mar 08 2013
(PARI) a(n)=if(n<3, 0, n*eulerphi(n)/2-1) \\ Charles R Greathouse IV, Mar 08 2013
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Andrew Weimholt, Jul 31 2005
EXTENSIONS
Added "greater than 1" to name to match terms, Joerg Arndt, Mar 08 2013
STATUS
approved