A368523 Positive integers in decreasing order of tau(k)/k, where tau(k) = A000005(k).
1, 2, 4, 3, 6, 8, 12, 5, 10, 9, 18, 24, 16, 20, 7, 14, 15, 30, 36, 28, 48, 40, 60, 21, 42, 32, 11, 22, 72, 13, 26, 27, 54, 56, 84, 44, 45, 90, 120, 80, 96, 33, 66, 25, 50, 17, 34, 52, 35, 70, 108, 64, 19, 38, 144, 39, 78, 180, 63, 126, 168, 88, 132, 100, 112
Offset: 1
Keywords
Examples
tau(1)/1 = tau(2)/2 = 1 tau(4)/4 = 3/4 tau(3)/3 = tau(6)/6 = 2/3 tau(8)/8 = tau(12)/12 = 1/2 tau(5)/5 = tau(10)/10 = 2/5 tau(9)/9 = tau(18)/18 = tau(24)/24 = 1/3
Programs
-
Lua
length = 100 result = {} for n = 1, length do local div_count = 0 local root_n = math.sqrt(n) for d = 1, root_n do if n % d == 0 then div_count = div_count + 2 end end if (root_n == math.floor(root_n)) then div_count = div_count - 1 end result[n] = {n, div_count / n} end function compare(a, b) if a[2] ~= b[2] then return a[2] > b[2] else return a[1] < b[1] end end table.sort(result, compare) i = 1 bound = 2 / math.sqrt(length) while result[i][2] >= bound do io.write(result[i][1] .. ',') i = i + 1 end
-
Mathematica
nmax = 100; s = Sort[Table[{k, DivisorSigma[0, k]/k}, {k, 1, nmax^2}], #1[[2]] >= #2[[2]] &]; Table[s[[j, 1]], {j, 1, nmax}] (* Vaclav Kotesovec, Jan 04 2024 *)
Comments