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 A172480 #10 Jan 11 2022 22:12:13 %S A172480 5,7,13,17,29,31,37,41,43,53,61,67,73,89,97,101,109,113,137,149,157, %T A172480 173,181,193,197,229,233,241,257,269,277,281,293,307,313,317,337,349, %U A172480 353,367,373,389,397,401,409,421,433,449,457,461,487,509,521,541,557,569 %N A172480 Odd primes p such that there are as many primitive roots (mod p) in the interval [0,p/2] as in the interval [p/2,p]. %C A172480 The sequence contains all the primes of the form 4m+1 (A002144). %C A172480 The sequence also contains some primes of the form 4m+3 (see them in A172490). %H A172480 Robert Israel, <a href="/A172480/b172480.txt">Table of n, a(n) for n = 1..10000</a> %p A172480 filter:= proc(p) local m; uses NumberTheory; %p A172480 if not isprime(p) then return false fi; %p A172480 if p mod 4 = 1 then return true fi; %p A172480 m:= Totient(Totient(p))/2; %p A172480 PrimitiveRoot(p,ith=m+1)=PrimitiveRoot(p,greaterthan=floor(p/2)) %p A172480 end proc: %p A172480 select(filter, [seq(i,i=5..1000,2)]); # _Robert Israel_, Nov 23 2019 %t A172480 << NumberTheory`NumberTheoryFunctions` m = 2; s = {}; While[m < 10000, m++; p = Prime[m]; If[Mod[p, 4] == 1, s = {s, p}, q = (p - 1)/2; g = PrimitiveRoot[p]; se = Select[Range[p - 1], GCD[ #, p - 1] == 1 &]; e = Length[se]; j = 0; t = 0; While[j < e, j++; h = PowerMod[g, se[[j]], p]; If[h <= q, t = t + 1,] ]; If[e == 2t, s = {s, p},] ] ]; s = Flatten[s] %Y A172480 A002144 is a subsequence. %Y A172480 Cf. A118818, A172490 %K A172480 nonn %O A172480 1,1 %A A172480 _Emmanuel Vantieghem_, Feb 04 2010