CINXE.COM
A097942 - OEIS
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <link rel="stylesheet" href="/styles.css"> <meta name="format-detection" content="telephone=no"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name=viewport content="width=device-width, initial-scale=1"> <meta name="keywords" content="OEIS,integer sequences,Sloane" /> <title>A097942 - OEIS</title> <link rel="search" type="application/opensearchdescription+xml" title="OEIS" href="/oeis.xml"> <script> var myURL = "\/A097942" function redir() { var host = document.location.hostname; if(host != "oeis.org" && host != "127.0.0.1" && !/^([0-9.]+)$/.test(host) && host != "localhost" && host != "localhost.localdomain") { document.location = "https"+":"+"//"+"oeis"+".org/" + myURL; } } function sf() { if(document.location.pathname == "/" && document.f) document.f.q.focus(); } </script> </head> <body bgcolor=#ffffff onload="redir();sf()"> <div class=loginbar> <div class=login> <a href="/login?redirect=%2fA097942">login</a> </div> </div> <div class=center><div class=top> <center> <div class=donors> The OEIS is supported by <a href="http://oeisf.org/#DONATE">the many generous donors to the OEIS Foundation</a>. </div> <div class=banner> <a href="/"><img class=banner border="0" width="600" src="/banner2021.jpg" alt="A097942 - OEIS"></a> </div> </center> </div></div> <div class=center><div class=pagebody> <div class=searchbarcenter> <form name=f action="/search" method="GET"> <div class=searchbargreet> <div class=searchbar> <div class=searchq> <input class=searchbox maxLength=1024 name=q value="" title="Search Query"> </div> <div class=searchsubmit> <input type=submit value="Search" name=go> </div> <div class=hints> <span class=hints><a href="/hints.html">Hints</a></span> </div> </div> <div class=searchgreet> (Greetings from <a href="/welcome">The On-Line Encyclopedia of Integer Sequences</a>!) </div> </div> </form> </div> <div class=sequence> <div class=space1></div> <div class=line></div> <div class=seqhead> <div class=seqnumname> <div class=seqnum> A097942 </div> <div class=seqname> 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, <a href="/A000010" title="Euler totient function phi(n): count numbers <= n and prime to n.">A000010</a>). </div> </div> <div class=scorerefs> 14 </div> </div> <div> <div class=seqdatabox> <div class=seqdata>1, 2, 4, 8, 12, 24, 48, 72, 144, 240, 432, 480, 576, 720, 1152, 1440, 2880, 4320, 5760, 8640, 11520, 17280, 25920, 30240, 34560, 40320, 51840, 60480, 69120, 80640, 103680, 120960, 161280, 181440, 207360, 241920, 362880, 483840, 725760, 967680</div> <div class=seqdatalinks> (<a href="/A097942/list">list</a>; <a href="/A097942/graph">graph</a>; <a href="/search?q=A097942+-id:A097942">refs</a>; <a href="/A097942/listen">listen</a>; <a href="/history?seq=A097942">history</a>; <a href="/search?q=id:A097942&fmt=text">text</a>; <a href="/A097942/internal">internal format</a>) </div> </div> </div> <div class=entry> <div class=section> <div class=sectname>OFFSET</div> <div class=sectbody> <div class=sectline>1,2</div> </div> </div> <div class=section> <div class=sectname>COMMENTS</div> <div class=sectbody> <div class=sectline>If you inspect PhiAnsYldList after running the Mathematica program below, the zeros with even-numbered indices should correspond to the nontotients (<a href="/A005277" title="Nontotients: even numbers k such that phi(m) = k has no solution.">A005277</a>).</div> <div class=sectline>Where records occur in <a href="/A014197" title="Number of numbers m with Euler phi(m) = n.">A014197</a>. - <a href="/wiki/User:T._D._Noe">T. D. Noe</a>, Jun 13 2006</div> <div class=sectline>Cf. <a href="/A131934" title="Records in A014197.">A131934</a>.</div> </div> </div> <div class=section> <div class=sectname>LINKS</div> <div class=sectbody> <div class=sectline>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)</div> <div class=sectline>Wikipedia, <a href="http://en.wikipedia.org/wiki/Highly_totient_number">Highly totient number</a>.</div> </div> </div> <div class=section> <div class=sectname>EXAMPLE</div> <div class=sectbody> <div class=sectline>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}.</div> </div> </div> <div class=section> <div class=sectname>MAPLE</div> <div class=sectbody> <div class=sectline>HighlyTotientNumbers := proc(n) # n > 1 is search maximum</div> <div class=sectline>local L, m, i, r; L := NULL; m := 0;</div> <div class=sectline>for i from 1 to n do</div> <div class=sectline> r := nops(numtheory[invphi](i));</div> <div class=sectline> if r > m then L := L, [i, r]; m := r fi</div> <div class=sectline>od; [L] end:</div> <div class=sectline><a href="/A097942" title="Highly totient numbers: each number k on this list has more solutions to the equation phi(x) = k than any preceding k (where...">A097942</a>_list := n -> seq(s[1], s = HighlyTotientNumbers(n));</div> <div class=sectline><a href="/A097942" title="Highly totient numbers: each number k on this list has more solutions to the equation phi(x) = k than any preceding k (where...">A097942</a>_list(500); # <a href="/wiki/User:Peter_Luschny">Peter Luschny</a>, Sep 01 2012</div> </div> </div> <div class=section> <div class=sectname>MATHEMATICA</div> <div class=sectbody> <div class=sectline>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]</div> </div> </div> <div class=section> <div class=sectname>PROG</div> <div class=sectbody> <div class=sectline>(Sage)</div> <div class=sectline>def HighlyTotientNumbers(n) : # n > 1 is search maximum.</div> <div class=sectline> R = {}</div> <div class=sectline> for i in (1..n^2) :</div> <div class=sectline> r = euler_phi(i)</div> <div class=sectline> if r <= n :</div> <div class=sectline> R[r] = R[r] + 1 if r in R else 1</div> <div class=sectline> # print R.keys() # <a href="/A002202" title="Values taken by totient function phi(m) (A000010).">A002202</a></div> <div class=sectline> # print R.values() # <a href="/A058277" title="Number of values of k such that phi(k) = n, where n runs through the values (A002202) taken by phi.">A058277</a></div> <div class=sectline> P = []; m = 1</div> <div class=sectline> for l in sorted(R.keys()) :</div> <div class=sectline> if R[l] > m : m = R[l]; P.append((l, m))</div> <div class=sectline> # print [l[0] for l in P] # <a href="/A097942" title="Highly totient numbers: each number k on this list has more solutions to the equation phi(x) = k than any preceding k (where...">A097942</a></div> <div class=sectline> # print [l[1] for l in P] # <a href="/A131934" title="Records in A014197.">A131934</a></div> <div class=sectline> return P</div> <div class=sectline><a href="/A097942" title="Highly totient numbers: each number k on this list has more solutions to the equation phi(x) = k than any preceding k (where...">A097942</a>_list = lambda n: [s[0] for s in HighlyTotientNumbers(n)]</div> <div class=sectline><a href="/A097942" title="Highly totient numbers: each number k on this list has more solutions to the equation phi(x) = k than any preceding k (where...">A097942</a>_list(500) # <a href="/wiki/User:Peter_Luschny">Peter Luschny</a>, Sep 01 2012</div> <div class=sectline>(PARI)</div> <div class=sectline>{ <a href="/A097942" title="Highly totient numbers: each number k on this list has more solutions to the equation phi(x) = k than any preceding k (where...">A097942</a>_list(n) = local(L, m, i, r);</div> <div class=sectline> m = 0;</div> <div class=sectline> for(i=1, n,</div> <div class=sectline>\\ from <a href="/wiki/User:Max_Alekseyev">Max Alekseyev</a>, http://home.gwu.edu/~maxal/gpscripts/</div> <div class=sectline> r = numinvphi(i);</div> <div class=sectline> if(r > m, print1(i, ", "); m = r) );</div> <div class=sectline>} \\ <a href="/wiki/User:Peter_Luschny">Peter Luschny</a>, Sep 01 2012</div> </div> </div> <div class=section> <div class=sectname>CROSSREFS</div> <div class=sectbody> <div class=sectline>A subsequence of <a href="/A007374" title="Smallest k such that phi(x) = k has exactly n solutions, n>=2.">A007374</a>.</div> <div class=sectline>Cf. <a href="/A000010" title="Euler totient function phi(n): count numbers <= n and prime to n.">A000010</a>, <a href="/A005277" title="Nontotients: even numbers k such that phi(m) = k has no solution.">A005277</a>, <a href="/A014573" title="Smallest k such that phi(x) = k has exactly n solutions, n>=0 with Carmichael conjecture.">A014573</a>, <a href="/A004653" title="Powers of 2 written in base 14. (Next term contains a non-decimal character.)">A004653</a>, <a href="/A105207" title="Records in A007374.">A105207</a>, <a href="/A105208" title="Where records occur in A007374.">A105208</a>.</div> <div class=sectline>Sequence in context: <a href="/A326076" title="Number of subsets of {1..n} containing all of their integer products <= n.">A326076</a> <a href="/A181808" title="Numbers that set a record for number of even divisors: a(n) = 2*A002182(n).">A181808</a> <a href="/A343014" title="Number with a record number of divisors whose prime factorizations contain no repeated exponents.">A343014</a> * <a href="/A354541" title="Number of ways to tile a double-hexagon strip of n hexagons, using single and double hexagons.">A354541</a> <a href="/A358513" title="a(n) is the smallest number whose divisors include exactly n that can be written in the form m + reverse(m), for some m (A06...">A358513</a> <a href="/A004653" title="Powers of 2 written in base 14. (Next term contains a non-decimal character.)">A004653</a></div> <div class=sectline>Adjacent sequences: <a href="/A097939" title="Sum of the smallest parts of all compositions of n.">A097939</a> <a href="/A097940" title="Sum of smallest parts (counted with multiplicity) of all compositions of n.">A097940</a> <a href="/A097941" title="Total number of smallest parts in all compositions of n.">A097941</a> * <a href="/A097943" title="Arrange 1-digit numbers in Danish in alphabetical order, then 2-digit numbers, then 3-digit numbers etc.">A097943</a> <a href="/A097944" title="Number of digits in n-th prime.">A097944</a> <a href="/A097945" title="a(n) = mu(n)*phi(n) where mu(n) is the Mobius function (A008683) and phi(n) is the Euler totient function (A000010).">A097945</a></div> </div> </div> <div class=section> <div class=sectname>KEYWORD</div> <div class=sectbody> <div class=sectline><span title="a sequence of nonnegative numbers">nonn</span></div> </div> </div> <div class=section> <div class=sectname>AUTHOR</div> <div class=sectbody> <div class=sectline><a href="/wiki/User:Alonso_del_Arte">Alonso del Arte</a>, Sep 05 2004</div> </div> </div> <div class=section> <div class=sectname>EXTENSIONS</div> <div class=sectbody> <div class=sectline>Edited and extended by <a href="/wiki/User:Robert_G._Wilson_v">Robert G. Wilson v</a>, Sep 07 2004</div> </div> </div> <div class=section> <div class=sectname>STATUS</div> <div class=sectbody> <div class=sectline>approved</div> </div> </div> </div> <div class=space10></div> </div> </div></div> <p> <div class=footerpad></div> <div class=footer> <center> <div class=bottom> <div class=linksbar> <a href="/">Lookup</a> <a href="/wiki/Welcome"><font color="red">Welcome</font></a> <a href="/wiki/Main_Page"><font color="red">Wiki</font></a> <a href="/wiki/Special:RequestAccount">Register</a> <a href="/play.html">Music</a> <a href="/plot2.html">Plot 2</a> <a href="/demo1.html">Demos</a> <a href="/wiki/Index_to_OEIS">Index</a> <a href="/webcam">WebCam</a> <a href="/Submit.html">Contribute</a> <a href="/eishelp2.html">Format</a> <a href="/wiki/Style_Sheet">Style Sheet</a> <a href="/transforms.html">Transforms</a> <a href="/ol.html">Superseeker</a> <a href="/recent">Recents</a> </div> <div class=linksbar> <a href="/community.html">The OEIS Community</a> </div> <div class=linksbar> Maintained by <a href="http://oeisf.org">The OEIS Foundation Inc.</a> </div> <div class=dbinfo>Last modified March 1 06:15 EST 2025. Contains 381294 sequences.</div> <div class=legal> <a href="/wiki/Legal_Documents">License Agreements, Terms of Use, Privacy Policy</a> </div> </div> </center> </div> </body> </html>