A373330 a(n) is the difference between T = A000217(n^2) and the greatest square not exceeding T.
0, 0, 1, 9, 15, 1, 41, 0, 55, 72, 9, 156, 36, 204, 262, 144, 135, 289, 209, 316, 111, 117, 406, 309, 527, 261, 342, 860, 804, 36, 954, 1200, 624, 605, 1257, 969, 1400, 741, 849, 1856, 1639, 0, 1721, 2076, 855, 701, 1770, 1101, 1719, 397, 426, 1980, 1416, 2449, 1142
Offset: 0
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..9998
- Hugo Pfoertner, Logarithmic plot of a(n) vs n, n <= 10^5, lower envelope of terms > 0 shown in red, zoom for details.
Crossrefs
Programs
-
Mathematica
Array[PolygonalNumber[#^2] - Floor[Sqrt[(#^4 + #^2)/2]]^2 &, 55, 0] (* Michael De Vlieger, Jun 02 2024 *)
-
PARI
a(n) = my(T=(n^4+n^2)/2); T-sqrtint(T)^2
-
Python
from sympy import integer_nthroot def A373330(n): return (T:=(n**4 + n**2) // 2)-(integer_nthroot(T,2)[0])**2 # Karl-Heinz Hofmann, Jul 01 2024