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.
%I A008330 #58 Aug 11 2025 05:05:43 %S A008330 1,1,2,2,4,4,8,6,10,12,8,12,16,12,22,24,28,16,20,24,24,24,40,40,32,40, %T A008330 32,52,36,48,36,48,64,44,72,40,48,54,82,84,88,48,72,64,84,60,48,72, %U A008330 112,72,112,96,64,100,128,130,132,72,88,96,92,144,96,120,96,156,80,96,172,112 %N A008330 phi(p-1), as p runs through the primes. %C A008330 Number of primitive roots in the field with p elements. %C A008330 Kátai proves that phi(p-1)/(p-1) has a continuous distribution function. - _Charles R Greathouse IV_, Jul 15 2013 %C A008330 For odd primes p, phi(p-1)<=(p-1)/2 since p has phi(p-1) primitive roots and (p-1)/2 quadratic residues and no primitive root is a quadratic residue. - _Geoffrey Critzer_, Apr 18 2015 %D A008330 D. H. Lehmer and Emma Lehmer, "Heuristics Anyone?", in: G. Szegö et al. (eds.), Studies in Mathematical Analysis and Related Topics: Essays in Honor of George Pólya, Stanford University Press, 1962, pp. 202-210. %H A008330 T. D. Noe, <a href="/A008330/b008330.txt">Table of n, a(n) for n = 1..10000</a> %H A008330 P. Erdős, <a href="http://www.renyi.hu/~p_erdos/1938-09.pdf">On the density of some sequences of numbers, III.</a>, J. London Math. Soc. 13 (1938), pp. 119-127. %H A008330 Imre Kátai, <a href="http://archive.numdam.org/article/CM_1968__19_4_278_0.pdf">On distribution of arithmetical functions on the set prime plus one</a>, Compositio Math. 19 (1968), pp. 278-289. %H A008330 S. S. Pillai, <a href="https://doi.org/10.1007/BF03049017">On the sum function connected with primitive roots</a>, Proceedings of the Indian Academy of Sciences - Section A, Vol. 13. No. 6 (1941), 526-529; <a href="https://www.ias.ac.in/public/Volumes/seca/013/06/0526-0529.pdf">alternative link</a>. %H A008330 I. J. Schoenberg, <a href="https://gdz.sub.uni-goettingen.de/id/PPN266833020_0028">Über die asymptotische Verteilung reeller Zahlen mod 1</a>, Mathematische Zeitschrift 28:1 (1928), pp. 171-199. %H A008330 P. J. Stephens, <a href="https://doi.org/10.1112/S0025579300008159">An average result for Artin's conjecture</a>, Mathematika, Vol. 16, No. 2 (1969), pp. 178-188. %F A008330 a(n) = phi(phi(prime(n))). - _Robert G. Wilson v_, Dec 26 2015 %F A008330 a(n) = phi(A006093(n)). - _Michel Marcus_, Dec 27 2015 %F A008330 Sum_{k; prime(k) <= x} a(k)/(prime(k)-1) = A * li(x) + O(x/log(x)^D), where A is Artin's constant (A005596), li(x) is the logarithmic integral, and D > 1 (Pillai, 1941; Lehmer and Lehmer 1962; Stephens, 1969). - _Amiram Eldar_, Jul 23 2025 %p A008330 A008330 := proc(n) %p A008330 numtheory[phi](ithprime(n)-1) ; %p A008330 end proc: %p A008330 seq(A008330(n),n=1..100) ; %t A008330 Table[ EulerPhi[ Prime@n - 1], {n, 70}] (* _Robert G. Wilson v_, Dec 17 2005 *) %o A008330 (PARI) a(n)=eulerphi(prime(n)-1) \\ _Charles R Greathouse IV_, Dec 08 2011 %o A008330 (Magma) [EulerPhi(NthPrime(n)-1): n in [1..80]]; // _Vincenzo Librandi_, Apr 06 2015 %Y A008330 Cf. A000010, A005596, A241194, A241195 (fraction phi(p-1)/(p-1)), A338364 (partial products). %K A008330 nonn,look %O A008330 1,3 %A A008330 _N. J. A. Sloane_