OFFSET
1,2
COMMENTS
The idea is to take note of when the fractional parts of the geometric mean and arithmetic mean "follow suit" with respect to the celebrated geometric mean <= arithmetic mean inequality.
LINKS
Wikipedia, Fractional part
Wikipedia, Inequality of arithmetic and geometric means
EXAMPLE
2 is a term because the geometric mean of 1 + 1/1 and 2 + 1/2 is the geometric mean of 2 and 2.5, which is a bit less than 2.24, whereas the arithmetic mean of 2 and 2.5 is 2.25, and 0.24 <= 0.25.
4 is not a term because the geometric mean is 2.90..., whereas the arithmetic mean is 3.02..., and 0.90 > 0.02.
MATHEMATICA
max=180; a={}; s[m_]:=m+1/m; For[m=1, m<=max, m++, If[FractionalPart[Mean[Table[s[k], {k, m}]]] >= FractionalPart[GeometricMean[Table[s[k], {k, m}]]], AppendTo[a, m]]]; a (* Stefano Spezia, Jul 27 2022 *)
PROG
(PARI) isok(m) = my(v=vector(m, k, k+1/k)); frac(sqrtn(vecprod(v), m)) <= frac(vecsum(v)/m); \\ Michel Marcus, Jul 28 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Mike Jones, Jul 27 2022
EXTENSIONS
More terms from Stefano Spezia, Jul 27 2022
STATUS
approved