n = io.read("*n")
Sum = 0
for i = 3,n,3
do
    print(i)
    Sum = Sum + i
end
print("Sum=",Sum)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: