A233401 Numbers k such that k^3 - b2 is a triangular number (A000217), where b2 is the largest square less than k^3.
1, 4, 8, 21, 37, 40, 56, 112, 113, 204, 280, 445, 481, 560, 688, 709, 1933, 1945, 3601, 3805, 3861, 4156, 4333, 4365, 7096, 8408, 8516, 11064, 12688, 13609, 13945, 16501, 17080, 18901, 21464, 23125, 27244, 27364, 28141, 45228, 45549, 58321, 60061, 66245, 70585, 78688
Offset: 1
Keywords
Programs
-
PARI
f(k) = if (issquare(k), sqrtint(k-1)^2, sqrtint(k)^2); \\ adapted from A048760 isok(k) = my(b2 = sqrtint(k^3-1)^2); (k^3-b2) && ispolygonal(k^3-b2, 3); \\ Michel Marcus, Jan 26 2019
-
Python
from math import isqrt def isTriangular(a): a+=a sr = isqrt(a) return (a==sr*(sr+1)) for n in range(1,79999): n3 = n*n*n b = isqrt(n3) if b*b==n3: b-=1 if isTriangular(n3-b*b): print(n, end=', ')
Comments