OFFSET
1,2
COMMENTS
The cubes k^3 begin: 1, 64, 512, 9261, 50653, 64000, 175616, 1404928, ...
The squares b2 begin: 0, 49, 484, 9216, 50625, 63504, 175561, 1404225, ...
Their square roots are 0, 7, 22, 96, 225, 252, 419, 1185, 1201, 2913, 4685, 9387, ...
PROG
(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=', ')
(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
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Alex Ratushnyak, Dec 09 2013
STATUS
approved