login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A233400 Number n such that a2 - n^3 is a triangular number (A000217), where a2 is the least square above n^3. 2

%I #6 Dec 07 2019 12:18:27

%S 0,1,2,9,12,107,109,120,244,337,381,407,565,592,937,1209,1224,1341,

%T 1717,2032,2402,3280,4957,5149,5265,5644,7065,7240,8181,8820,9712,

%U 10732,11901,15059,18300,19120,20436,22672,24516,25139,28044,28550,36145,38221,66201,72335,77100

%N Number n such that a2 - n^3 is a triangular number (A000217), where a2 is the least square above n^3.

%C The sequence of cubes begins: 0, 1, 8, 729, 1728, 1225043, 1295029, 1728000, 14526784, 38272753, 55306341, ...

%C The sequence of squares begins: 1, 4, 9, 784, 1764, 1225449, 1295044, 1729225, 14531344, 38278969, 55308969, ...

%C The sequence of roots of these squares begins: 1, 2, 3, 28, 42, 1107, 1138, 1315, 3812, 6187, 7437, 8211, 13430, 14404, 28682, ...

%o (Python)

%o def isqrt(a):

%o sr = 1L << (long.bit_length(long(a)) >> 1)

%o while a < sr*sr: sr>>=1

%o b = sr>>1

%o while b:

%o s = sr+b

%o if a >= s*s: sr = s

%o b>>=1

%o return sr

%o def isTriangular(a):

%o a+=a

%o sr = isqrt(a)

%o return (a==sr*(sr+1))

%o for n in range(77777):

%o n3 = n*n*n

%o a = isqrt(n3)+1

%o if isTriangular(a*a-n3): print str(n)+',',

%Y Cf. A000217, A000290, A000578, A233401.

%K nonn

%O 1,3

%A _Alex Ratushnyak_, Dec 09 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)