%I #9 Apr 20 2019 03:02:23
%S 1,2,3,15,21,231,273,255,285,167739,56751695,7599867,3829070245,
%T 567641679,510795753,39169969059,704463969,3717740976339,42917990271,
%U 547701649495,45484457928390429,59701280265935165
%N Squarefree k such that phi(k)/k - 1/2 is positive and minimal for k with gpf(k) = prime(n).
%C Let gpf(k) = A006530(k) and let phi(n) = A000010(n) for k in A005117.
%C There are 2^(n-1) numbers k with gpf(k) = prime(n), since we can only either have p_i^0 or p_i^1 where p_i | k and i <= n. For example, for n = 2, there are only 2 squarefree numbers k with prime(2) = 3 as greatest prime factor. These are 3 = 2^0 * 3^1, and 6 = 2^1 * 3^1. We observe that we can write multiplicities of the primes as A067255(k), and thus for the example derive 3 = "0,1" and 6 = "1,1". Thus for n = 3, we have 5 = "0,0,1", 15 = "0,1,1", 10 = "1,0,1", and 30 = "1,1,1". This establishes the possible values of k with respect to n. We choose the value of k in n for which phi(k)/k - 1/2 is positive and minimal.
%C We know that prime k (in A000040) have phi(k)/k = A006093(n)/A000040(n) and represent maxima in n. We likewise know primorials k (in A002110) have phi(k)/k = A038110(n)/A060753(n) and represent minima in n. This sequence shows squarefree numbers k with gpf(k) = n such that their value phi(k)/k is closest to but more than 1/2.
%C Apart from a(1) = 2, all terms are odd. For n > 1 and k even, phi(k)/k - 1/2 is negative.
%H Michael De Vlieger, <a href="/A325236/a325236.png">Plot of A325236(n) among terms in row n of A307540</a>.
%e First terms of this sequence appear in the chart below between asterisks.
%e The values of n appear in the header, values of k followed parenthetically by phi(k)/k appear in column n. The x axis plots k according to primepi(gpf(k)), while the y axis plots k according to phi(k)/k:
%e 0 1 2 3 4
%e . . . . .
%e -- *1* -----------------------------------------------
%e (1/1) . . . .
%e . . . . .
%e . . . . .
%e . . . . 7
%e . . . 5 (6/7)
%e . . . (4/5) .
%e . . . . .
%e . . . . 35
%e . . *3* . (24/35)
%e . . (2/3) . .
%e . . . . .
%e . . . . .
%e . . . . *21*
%e . . . . (4/7)
%e . . . *15* .
%e . . . (8/15) .
%e . *2* . . .
%e ----------(1/2)---------------------------------------
%e . . . . .
%e . . . . 105
%e . . . . (16/35)
%e . . . . 14
%e . . . 10 (3/7)
%e . . . (2/5) .
%e . . . . .
%e . . . . 70
%e . . 6 . (12/35)
%e . . (1/3) . .
%e . . . . 42
%e . . . 30 (2/7)
%e . . . (4/15) .
%e . . . . 210
%e . . . . (8/35)
%e ...
%e a(3) = 15 for the following reasons. There are 4 possible values of k with n = 3. These are 5, 15, 10, and 30 with phi(k)/k = 4/5, 8/15, 2/5, and 4/15, respectively. Subtracting 1/2 from each of the latter values, we derive 3/10, 1/30, -1/10, and -7/30 respectively. Since the smallest of these differences is 3/10 pertaining to k = 15, a(3) = 15.
%t With[{e = 15}, Map[MinimalBy[#, If[# < 0, # + 1, #] &[#[[2]] - 1/2] &] &, SplitBy[#, Last]] &@ Array[{#2, EulerPhi[#2]/#2, If[! IntegerQ@ #, 0, #] &[1 + Floor@ Log2@ #1]} & @@ {#, Times @@ MapIndexed[Prime[First@ #2]^#1 &, Reverse@ IntegerDigits[#, 2]]} &, 2^(e + 1), 0]][[All, 1, 1]]
%Y Cf. A000010, A000040, A002110, A005117, A006093, A006530, A038110, A060753, A307540, A325237.
%K nonn
%O 0,2
%A _Michael De Vlieger_, Apr 19 2019