OFFSET
1,2
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..196
Eric Weisstein's World of Mathematics, Totative.
FORMULA
EXAMPLE
For n = 3: A002110(3) = 30, the reduced residue system of 30 is {1, 7, 11, 13, 17, 19, 23, 29}. The sum is a(3) = 120.
MATHEMATICA
n = 15;
A002110 = Drop[FoldList[Times, 1, Prime[Range[n]]], 1];
A005867 = Drop[EulerPhi@FoldList[Times, 1, Prime@Range@n], 1];
(* Second program: *)
Map[# EulerPhi[#]/2 &, FoldList[Times, Prime@ Range@ 14]] (* Michael De Vlieger, Apr 07 2021 *)
PROG
(PARI) a(n) = my(P=factorback(primes(n))); P*eulerphi(P)/2; \\ Michel Marcus, Jun 02 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Jamie Morken, Jun 02 2020
STATUS
approved