I have plotted the following function using the following code:
integers = Table[Integer[n], {n, 20}];
ListPlot[Table[{x,
x^(-1)*Sum[((6.674*(10^(-11))*(10^17) (4))/((100^2 -
400 (2 Cos[(2 Pi k)/x] - 3 Sin[(2 Pi k)/x]) +
29)^1.5)), {k, 0, x - 1}]}, {x, integers}]]
The function oscillated because it takes values that are not integers. I have searched around and the above does not work. I'm new to mathematica. How can I change the code to make it only use integer values of x?
integers = Range[20]
. $\endgroup$