A233400 Number n such that a2 - n^3 is a triangular number (A000217), where a2 is the least square above n^3.
0, 1, 2, 9, 12, 107, 109, 120, 244, 337, 381, 407, 565, 592, 937, 1209, 1224, 1341, 1717, 2032, 2402, 3280, 4957, 5149, 5265, 5644, 7065, 7240, 8181, 8820, 9712, 10732, 11901, 15059, 18300, 19120, 20436, 22672, 24516, 25139, 28044, 28550, 36145, 38221, 66201, 72335, 77100
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..500
Programs
-
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
-
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=', ')
Comments