A354424 Numbers k for which the ratio A008475(k)/k reaches a record low.
2, 6, 10, 12, 15, 20, 28, 30, 40, 42, 56, 60, 84, 105, 120, 140, 168, 180, 210, 252, 280, 315, 330, 360, 385, 390, 420, 616, 630, 660, 770, 780, 840, 924, 1092, 1155, 1260, 1540, 1820, 1848, 1980, 2184, 2310, 2520, 2730, 3080, 3465, 3640, 3960, 4095, 4290, 4620, 5460, 6552, 6930
Offset: 1
Keywords
Examples
First, an element of order 2 shows up in S_2, so the smallest ratio we've seen so far is 1. This is the smallest ratio we see until we reach 6, since there's an element of order 6 in S_5. Next is 10, since there's an element of order 10 in S_7, and 7/10 is the next ratio smaller than 5/6. Then comes 12, since S_7 also has an element of order 12, and 7/12 is the next ratio less than 7/10, etc.
Crossrefs
Cf. A008475.
Programs
-
Mathematica
s = {}; fm = 2; Do[If[(f = Plus @@ Power @@@ FactorInteger[n]/n) < fm, fm = f; AppendTo[s, n]], {n, 2, 7000}]; s (* Amiram Eldar, Jul 12 2022 *)
-
PARI
b(n) = my(f=factor(n)); vecsum(vector(#f~, i, f[i, 1]^f[i, 2])); \\ A008475 lista(nn) = my(m=oo, list=List(), x); for (n=2, nn, if ((x=b(n)/n) < m, m = x; listput(list, n););); Vec(list); \\ Michel Marcus, Jul 12 2022
-
Sage
memo = {1: (2,1)} def a(n): if n in memo.keys(): return memo[n] _ = a(n-1) prev, prevRatio = memo[n-1] ratio = 1 N = prev while ratio >= prevRatio: N += 1 # compute m so that S_m has an element of order N principalDivisors = list(factor(N)) m = sum([a^b for (a,b) in principalDivisors]) ratio = m/N memo[n] = (N, ratio) return N
Comments