OFFSET
0,4
COMMENTS
a(n)=0, iff 1 + n + n^2 + n^3 is a perfect square. For example, a(7)=0 and we have 1 + 7 + 7^2 + 7^3 = 20^2.
a(n) = Difference between smallest square >= (n^3 + n^2 + n + 1) and (n^3 + n^2 + n + 1) - Antti Karttunen, Nov 27 2013
LINKS
Ivan Panchenko, Table of n, a(n) for n = 0..1000
FORMULA
PROG
(PARI) a(n) = ceil(sqrt(n^3+n^2+n+1))^2 - (n^3+n^2+n+1); \\ Michel Marcus, Nov 23 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Nov 23 2013
EXTENSIONS
More terms from Peter J. C. Moses
STATUS
approved