login
A232395
(ceiling(sqrt(n^3 + n^2 + n + 1)))^2 - (n^3 + n^2 + n + 1).
3
0, 0, 1, 9, 15, 13, 30, 0, 40, 21, 45, 57, 51, 21, 70, 105, 120, 109, 66, 156, 43, 77, 81, 49, 216, 108, 217, 9, 36, 21, 293, 192, 31, 189, 309, 385, 411, 381, 289, 129, 408, 112, 281, 396, 451, 440, 357, 196, 624, 309, 613, 120, 276, 360, 366, 288, 120, 725
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
FORMULA
Contribution from Antti Karttunen, Nov 27 2013: (Start)
a(n) = A000290(⌈sqrt(A053698(n))⌉) - A053698(n). Where ⌈x⌉ stands for ceiling(x). This further reduces as:
a(n) = A000290(A135034(A053698(n))) - A053698(n).
a(n) = A048761(A053698(n)) - A053698(n).
a(n) = A068527(A053698(n)).
(End)
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
Sequence in context: A073920 A130119 A346609 * A184048 A284128 A058957
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Nov 23 2013
EXTENSIONS
More terms from Peter J. C. Moses
STATUS
approved