OFFSET
1,3
COMMENTS
The sequence of cubes begins: 0, 1, 8, 729, 1728, 1225043, 1295029, 1728000, 14526784, 38272753, 55306341, ...
The sequence of squares begins: 1, 4, 9, 784, 1764, 1225449, 1295044, 1729225, 14531344, 38278969, 55308969, ...
The sequence of roots of these squares begins: 1, 2, 3, 28, 42, 1107, 1138, 1315, 3812, 6187, 7437, 8211, 13430, 14404, 28682, ...
LINKS
Robert Israel, Table of n, a(n) for n = 1..500
MAPLE
istri:= proc(n) issqr(1+8*n) end proc:
filter:= proc(n) local a2, t;
a2:= (floor(sqrt(n^3))+1)^2;
istri(a2-n^3)
end proc:
select(filter, [$0..10^5]); # Robert Israel, Sep 10 2024
PROG
(Python)
def isqrt(a):
sr = 1 << (int.bit_length(int(a)) >> 1)
while a < sr*sr: sr>>=1
b = sr>>1
while b:
s = sr+b
if a >= s*s: sr = s
b>>=1
return sr
def isTriangular(a):
a+=a
sr = isqrt(a)
return (a==sr*(sr+1))
for n in range(77777):
n3 = n*n*n
a = isqrt(n3)+1
if isTriangular(a*a-n3): print(str(n), end=', ')
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Dec 09 2013
STATUS
approved