A232423 a(n) = ceiling(sqrt(n^4 - n^3 - n^2 + n + 1))^2 - (n^4 - n^3 - n^2 + n + 1).
0, 0, 2, 0, 15, 3, 38, 8, 71, 15, 114, 24, 167, 35, 230, 48, 303, 63, 386, 80, 479, 99, 582, 120, 695, 143, 818, 168, 951, 195, 1094, 224, 1247, 255, 1410, 288, 1583, 323, 1766, 360, 1959, 399, 2162, 440, 2375, 483, 2598, 528, 2831, 575, 3074, 624, 3327, 675
Offset: 0
Keywords
Programs
-
Python
from math import isqrt def A232423(n): return (1+isqrt(m:=n*(n*(n*(n-1)-1)+1)))**2-m-1 # Chai Wah Wu, Jul 29 2022
Formula
For odd n>=3, a(n) = A232397(n); for even n>=2, a(n) = 5/4 * n^2 - n - 1.
Extensions
More terms from Peter J. C. Moses
Comments