(I) The derivative of the function is f′(x)=ex−a.
1. When a⩽1, f′(x)=ex−a⩾0 holds for any x⩾0, so f(x) is a monotonically increasing function on (0,+∞); Since f(0)=0, f(x)⩾f(0)=0 holds for any x⩾0.
2. When a>1, let f′(x)=0, we get x=lna>0. When x∈(0,lna), f′(x)0, f(x) is monotonically increasing. If f(x)⩾0 holds for any x⩾0, then only need f(x)_min=f(lna)=elna−alna−1=a−alna−1⩾0. Let g(a)=a−alna−1(a>1), then g′(a)=1−lna−1=−lna1.
In conclusion, a⩽1.
(II) From (I), when a=1, f(x)=ex−x−1, f′(x)=ex−1. It is easy to get f(x)_min=f(0)=0, i.e., ex⩾x+1 holds for any x∈R. Taking x=−3n3i−1(i=1,2,…,n), we get 1−3n3i−1⩽e−3n3i−1, i.e., (1−3n3i−1)n⩽(e−3n3i−1)n⩽e(3n3i−1)n=e−33i−1. Summing up, we get (1−3n2)n+(1−3n5)n+…+(1−3n3n−1)n⩽e−32+e−35+…+e−33n−1. Therefore, (3n−2)n+(3n−5)n+…+1n⩽[e−32+e−35+…+e−33n−1](3n)n=e−321−e11−en1(3n)n<e−1e31(3n)n. So when n⩾2,n∈N, it always holds that 1n+4n+7n+…+(3n−2)n<e−1e31(3n)n.