A090555 Erroneous version of A014573.
10, 1, 2, 4, 8, 16
Offset: 1
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.
a = Table[ 0, {10^5} ]; Do[ s = EulerPhi[ n ]; If[ s < 100001, a[ [ s ] ]++ ], {n, 1, 10^6} ]; Do[ k = 1; While[ a[ [ k ] ] != n, k++ ]; Print[ k ], {n, 2, 75} ]
v=vectorsmall(10^6);for(n=1,1e7,t=eulerphi(n);if(t<=#v,v[t]++)) u=vector(100);for(i=1,#v,t=v[i];if(t&&t<=#u&&u[t]==0,u[t]=i)); u[2..#u] \\ Charles R Greathouse IV, Oct 13 2014
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}.
HighlyTotientNumbers := proc(n) # n > 1 is search maximum local L, m, i, r; L := NULL; m := 0; for i from 1 to n do r := nops(numtheory[invphi](i)); if r > m then L := L,[i,r]; m := r fi od; [L] end: A097942_list := n -> seq(s[1], s = HighlyTotientNumbers(n)); A097942_list(500); # Peter Luschny, Sep 01 2012
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]
{ A097942_list(n) = local(L, m, i, r); m = 0; for(i=1, n, \\ from Max Alekseyev, http://home.gwu.edu/~maxal/gpscripts/ r = numinvphi(i); if(r > m, print1(i,", "); m = r) ); } \\ Peter Luschny, Sep 01 2012
def HighlyTotientNumbers(n) : # n > 1 is search maximum. R = {} for i in (1..n^2) : r = euler_phi(i) if r <= n : R[r] = R[r] + 1 if r in R else 1 # print R.keys() # A002202 # print R.values() # A058277 P = []; m = 1 for l in sorted(R.keys()) : if R[l] > m : m = R[l]; P.append((l,m)) # print [l[0] for l in P] # A097942 # print [l[1] for l in P] # A131934 return P A097942_list = lambda n: [s[0] for s in HighlyTotientNumbers(n)] A097942_list(500) # Peter Luschny, Sep 01 2012
n=3: a(3)=1111 because InvPhi[1000]= {1111,1255,1375,1875,2008,2222,2500,2510,2750,3012,3750}.
n=3: a(3)=11 because InvPhi(1000) = {1111, 1255, 1375, 1875, 2008, 2222, 2500, 2510, 2750, 3012, 3750}.
[seq(nops(invphi(10^i)),i=1..8)];
a(n) = #invphi(10^n); \\ for invphi see Alekseyev link \\ Michel Marcus, May 14 2020
n=3: a(3)=3750 because InvPhi(1000) = {1111, 1255, 1375, 1875, 2008, 2222, 2500, 2510, 2750, 3012, 3750}.
NestList[Function[n, SelectFirst[Range[n + 1, 10^4], Divisible[EulerPhi@ #, EulerPhi@ n] &]], 1, 54] (* Michael De Vlieger, May 01 2016, Version 10 *)
EulerPhi@ NestList[Function[n, SelectFirst[Range[n + 1, 10^4], Divisible[EulerPhi@ #, EulerPhi@ n] &]], 1, 55] (* Michael De Vlieger, May 01 2016, Version 10 *)
Comments