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 A097942 #47 Nov 02 2023 02:07:16 %S A097942 1,2,4,8,12,24,48,72,144,240,432,480,576,720,1152,1440,2880,4320,5760, %T A097942 8640,11520,17280,25920,30240,34560,40320,51840,60480,69120,80640, %U A097942 103680,120960,161280,181440,207360,241920,362880,483840,725760,967680 %N A097942 Highly totient numbers: each number k on this list has more solutions to the equation phi(x) = k than any preceding k (where phi is Euler's totient function, A000010). %C A097942 If you inspect PhiAnsYldList after running the Mathematica program below, the zeros with even-numbered indices should correspond to the nontotients (A005277). %C A097942 Where records occur in A014197. - _T. D. Noe_, Jun 13 2006 %C A097942 Cf. A131934. %H A097942 Jud McCranie, <a href="/A097942/b097942.txt">Table of n, a(n) for n = 1..109</a> (terms 1..79 from T. D. Noe, terms 80..86 from Donovan Johnson) %H A097942 Wikipedia, <a href="http://en.wikipedia.org/wiki/Highly_totient_number">Highly totient number</a>. %e A097942 a(4) = 8 since phi(x) = 8 has the solutions {15, 16, 20, 24, 30}, one more solution than a(3) = 4 for which phi(x) = 4 has solutions {5, 8, 10, 12}. %p A097942 HighlyTotientNumbers := proc(n) # n > 1 is search maximum %p A097942 local L, m, i, r; L := NULL; m := 0; %p A097942 for i from 1 to n do %p A097942 r := nops(numtheory[invphi](i)); %p A097942 if r > m then L := L,[i,r]; m := r fi %p A097942 od; [L] end: %p A097942 A097942_list := n -> seq(s[1], s = HighlyTotientNumbers(n)); %p A097942 A097942_list(500); # _Peter Luschny_, Sep 01 2012 %t A097942 searchMax = 2000; phiAnsYldList = Table[0, {searchMax}]; Do[phiAns = EulerPhi[m]; If[phiAns <= searchMax, phiAnsYldList[[phiAns]]++ ], {m, 1, searchMax^2}]; highlyTotientList = {1}; currHigh = 1; Do[If[phiAnsYldList[[n]] > phiAnsYldList[[currHigh]], highlyTotientList = {highlyTotientList, n}; currHigh = n], {n, 2, searchMax}]; Flatten[highlyTotientList] %o A097942 (Sage) %o A097942 def HighlyTotientNumbers(n) : # n > 1 is search maximum. %o A097942 R = {} %o A097942 for i in (1..n^2) : %o A097942 r = euler_phi(i) %o A097942 if r <= n : %o A097942 R[r] = R[r] + 1 if r in R else 1 %o A097942 # print R.keys() # A002202 %o A097942 # print R.values() # A058277 %o A097942 P = []; m = 1 %o A097942 for l in sorted(R.keys()) : %o A097942 if R[l] > m : m = R[l]; P.append((l,m)) %o A097942 # print [l[0] for l in P] # A097942 %o A097942 # print [l[1] for l in P] # A131934 %o A097942 return P %o A097942 A097942_list = lambda n: [s[0] for s in HighlyTotientNumbers(n)] %o A097942 A097942_list(500) # _Peter Luschny_, Sep 01 2012 %o A097942 (PARI) %o A097942 { A097942_list(n) = local(L, m, i, r); %o A097942 m = 0; %o A097942 for(i=1, n, %o A097942 \\ from _Max Alekseyev_, http://home.gwu.edu/~maxal/gpscripts/ %o A097942 r = numinvphi(i); %o A097942 if(r > m, print1(i,", "); m = r) ); %o A097942 } \\ _Peter Luschny_, Sep 01 2012 %Y A097942 A subsequence of A007374. %Y A097942 Cf. A000010, A005277, A014573, A004653, A105207, A105208. %K A097942 nonn %O A097942 1,2 %A A097942 _Alonso del Arte_, Sep 05 2004 %E A097942 Edited and extended by _Robert G. Wilson v_, Sep 07 2004