login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A345674 Euler totient function phi(n) - number of primitive roots modulo n. 0
0, 0, 1, 1, 2, 1, 4, 4, 4, 2, 6, 4, 8, 4, 8, 8, 8, 4, 12, 8, 12, 6, 12, 8, 12, 8, 12, 12, 16, 8, 22, 16, 20, 8, 24, 12, 24, 12, 24, 16, 24, 12, 30, 20, 24, 12, 24, 16, 30, 12, 32, 24, 28, 12, 40, 24, 36, 16, 30, 16, 44, 22, 36, 32, 48, 20, 46, 32, 44, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

LINKS

Table of n, a(n) for n=1..70.

FORMULA

a(n) = A000010(n) - A046144(n).

MAPLE

a:= proc(n) uses numtheory; `if`(n=1, 0, (p->

      p-add(`if`(order(i, n)=p, 1, 0), i=0..n-1))(phi(n)))

    end:

seq(a(n), n=1..70);  # Alois P. Heinz, Jun 22 2021

MATHEMATICA

a[n_] := (e = EulerPhi[n]) - If[n == 1 || IntegerQ @ PrimitiveRoot[n], EulerPhi[e], 0]; Array[a, 100] (* Amiram Eldar, Jun 23 2021 *)

CROSSREFS

Cf. A000010, A046144.

Sequence in context: A110316 A111975 A117250 * A296337 A308432 A136692

Adjacent sequences:  A345671 A345672 A345673 * A345675 A345676 A345677

KEYWORD

nonn

AUTHOR

Robert Hutchins, Jun 22 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 24 16:41 EDT 2022. Contains 356943 sequences. (Running on oeis4.)