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 A307711 #17 Apr 28 2019 20:09:04 %S A307711 3,31,97,331,1009,3067,11513,27403,64621,185617,480853,1333951, %T A307711 3524431,9558361,26080333,70411483,189961939 %N A307711 a(n) is the least number k such that exactly fraction 1/n of the members of the reduced residue system mod k are prime, or 0 if there is no such k. %C A307711 a(n) is the least number k, if any exists, such that A000010(k)/A048865(k) = n. %C A307711 a(n) = A307712(m) for the least m such that A307713(m)=n. %F A307711 n*A048865(a(n)) = A000010(a(n)). %e A307711 Of the 30 members of the reduced residue system mod 31, exactly one-third, namely 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, are prime. 31 is the least number with this property, so a(3) = 31. %p A307711 f:= proc(n) uses numtheory; %p A307711 phi(n)/(pi(n) - nops(factorset(n))); %p A307711 end proc: %p A307711 N:= 13: # to get a(2)..a(N) %p A307711 R:= Array(2..N): count:= 0: %p A307711 for k from 3 while count < N-1 do %p A307711 v:= f(k); %p A307711 if v::integer and v <= N and R[v] = 0 then %p A307711 R[v]:= k; %p A307711 count:= count+1; %p A307711 fi %p A307711 od: %p A307711 convert(R,list); %t A307711 With[{s = Table[EulerPhi[n]/Count[Prime@ Range@ PrimePi@ n, _?(GCD[#, n] == 1 &)], {n, 3, 10^4}]}, Array[2 + FirstPosition[s, #][[1]] &, Max@ Select[s, IntegerQ] - 1, 2]] (* _Michael De Vlieger_, Apr 23 2019 *) %Y A307711 Cf. A000010, A048865, A307712. %K A307711 nonn,more %O A307711 2,1 %A A307711 _J. M. Bergot_ and _Robert Israel_, Apr 23 2019