cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A345674 Euler totient function phi(n) - number of primitive roots modulo n.

This page as a plain text file.
%I A345674 #13 Aug 07 2021 16:37:35
%S A345674 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,
%T A345674 22,16,20,8,24,12,24,12,24,16,24,12,30,20,24,12,24,16,30,12,32,24,28,
%U A345674 12,40,24,36,16,30,16,44,22,36,32,48,20,46,32,44,24
%N A345674 Euler totient function phi(n) - number of primitive roots modulo n.
%F A345674 a(n) = A000010(n) - A046144(n).
%p A345674 a:= proc(n) uses numtheory; `if`(n=1, 0, (p->
%p A345674       p-add(`if`(order(i, n)=p, 1, 0), i=0..n-1))(phi(n)))
%p A345674     end:
%p A345674 seq(a(n), n=1..70);  # _Alois P. Heinz_, Jun 22 2021
%t A345674 a[n_] := (e = EulerPhi[n]) - If[n == 1 || IntegerQ @ PrimitiveRoot[n], EulerPhi[e], 0]; Array[a, 100] (* _Amiram Eldar_, Jun 23 2021 *)
%Y A345674 Cf. A000010, A046144.
%K A345674 nonn
%O A345674 1,5
%A A345674 _Robert Hutchins_, Jun 22 2021