Solution. Let us assume that n5+n3+2n2+2n+2 and 2n2+n+2 are perfect cubes, i.e., there exist natural numbers x and y such that
n5+n3+2n2+2n+2=x32n2+n+2=y3
Then
x3−y3=n5+n3+n=n(n4+2n2+1−n2)=n(n2+n+1)(n2−n+1)
so
(x−y)(x2+xy+y2)=n(n2+n+1)(n2−n+1)
The product on the right side of the last equation is divisible by 3. Indeed, if n=3k then the first factor is divisible by 3, if n=3k+1, then the second factor is divisible by 3, and for n=3k+2 the third factor is divisible by 3. Therefore, 3∣x−y or 3∣x2+xy+y2. However, from x2+xy+y2=(x−y)2+3xy it follows that 3∣x2+xy+y2 if and only if 3∣x−y. Therefore, in this case, 3∣x−y and also 3∣x2+xy+y2, which means that 9∣x3−y3.
From the above considerations, it follows that 9∣n(n2+n+1)(n2−n+1). Furthermore, no two of the numbers n,n2+n+1, and n2−n+1 are simultaneously divisible by 3 (Why?), so the following cases are possible.
Case 1. If 9∣n, then x3=n5+n3+2n2+2n+2≡2(mod9), which is not possible since the cube of a natural number when divided by 9 does not give a remainder of 2.
Case 2. If 9∣n2+n+1, then a(a+1)=a2+a≡8(mod9), but a direct check shows that the product of two consecutive natural numbers when divided by 9 does not give a remainder of 8.
Case 3. If 9∣n2−n+1, then a(a−1)=a2−a≡8(mod9), but a direct check shows that the product of two consecutive natural numbers when divided by 9 does not give a remainder of 8.