%I #25 Jan 14 2021 20:01:23
%S 3,9,39,117,351,507,3417,10251,30753,58089,92259,656121,3870849,
%T 98845053,429262593,7508684661
%N Numbers n divided by EulerPhi(n) in approximately the golden ratio, i.e., n minimizing |(k / EulerPhi(k)) - golden ratio phi| for numbers k with the same number of digits as n.
%C Since phi is irrational, n/EulerPhi(n) can only approximate phi. Probably an open question: can |(n/EulerPhi(n)) - phi| be made arbitrarily close to 0?
%C The listed terms have this property: for r = 1,...,5, all r-digit terms share the same set of prime factors. For example, all three 3-digit terms have prime factors 3 and 13. Furthermore, all listed terms are multiples of 3. I conjecture that these properties hold in general.
%H J. L. Pe, <a href="http://numeratus.net/harmonicphi/harmonicphi.html">On Approximate Harmonic Division of n by phi(n)</a>
%e |3/EulerPhi(3) - phi| = 0.118034 (approximately) is minimal for all one-digit numbers, with 3/EulerPhi(3) = 9/EulerPhi(9) = 3/2.
%e |117/EulerPhi(117) - phi| = 0.006966 (approximately) is minimal for all three-digit numbers, with 117/EulerPhi(117) = 351/Eulerphi(351) = 507/EulerPhi(507) = 13/8.
%p A065657 := proc(n) gr := (1+sqrt(5))/2 ; appr := 1000000+n ;dg := {} ;
%p for k from 10^(n-1) to 10^n-1 do
%p qual := abs(k/numtheory[phi](k)-gr) ;
%p if dg = {} or is(qual < appr) then dg := {k} ; appr := qual ;
%p elif qual = appr then dg := dg union {k} ;
%p end if;
%p end do:
%p print(sort(dg)) ;
%p end proc:
%p for n from 1 do A065657(n) ; end do: # _R. J. Mathar_, Nov 16 2010
%t run[k_] := run[k] = SplitBy[Sort[Table[{Abs[n/EulerPhi[n] - GoldenRatio] // N, n}, {n, 10^(k-1), 10^k-1}]], First][[1]][[All, 2]];
%t Table[Print[run[k]]; run[k], {k, 1, 7}] // Flatten (* _Jean-François Alcover_, Jun 22 2019 *)
%Y Cf. A001622, A000010.
%K nonn,base,more
%O 1,1
%A _Joseph L. Pe_, Dec 03 2001
%E Edited and link fixed; would someone check this sequence? - _Charles R Greathouse IV_, Aug 02 2010
%E Checked up to and including the 5-digit terms, replaced prime factor example in the comment - _R. J. Mathar_, Nov 16 2010
%E a(12)-a(16) from _Donovan Johnson_, Sep 25 2011