cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A233400 #15 Sep 25 2024 11:53:19
%S A233400 0,1,2,9,12,107,109,120,244,337,381,407,565,592,937,1209,1224,1341,
%T A233400 1717,2032,2402,3280,4957,5149,5265,5644,7065,7240,8181,8820,9712,
%U A233400 10732,11901,15059,18300,19120,20436,22672,24516,25139,28044,28550,36145,38221,66201,72335,77100
%N A233400 Number n such that a2 - n^3 is a triangular number (A000217), where a2 is the least square above n^3.
%C A233400 The sequence of cubes begins: 0, 1, 8, 729, 1728, 1225043, 1295029, 1728000, 14526784, 38272753, 55306341, ...
%C A233400 The sequence of squares begins: 1, 4, 9, 784, 1764, 1225449, 1295044, 1729225, 14531344, 38278969, 55308969, ...
%C A233400 The sequence of roots of these squares begins: 1, 2, 3, 28, 42, 1107, 1138, 1315, 3812, 6187, 7437, 8211, 13430, 14404, 28682, ...
%H A233400 Robert Israel, <a href="/A233400/b233400.txt">Table of n, a(n) for n = 1..500</a>
%p A233400 istri:= proc(n) issqr(1+8*n) end proc:
%p A233400 filter:= proc(n) local a2, t;
%p A233400   a2:= (floor(sqrt(n^3))+1)^2;
%p A233400   istri(a2-n^3)
%p A233400 end proc:
%p A233400 select(filter, [$0..10^5]); # _Robert Israel_, Sep 10 2024
%o A233400 (Python)
%o A233400 def isqrt(a):
%o A233400     sr = 1 << (int.bit_length(int(a)) >> 1)
%o A233400     while a < sr*sr:  sr>>=1
%o A233400     b = sr>>1
%o A233400     while b:
%o A233400         s = sr+b
%o A233400         if a >= s*s:  sr = s
%o A233400         b>>=1
%o A233400     return sr
%o A233400 def isTriangular(a):
%o A233400     a+=a
%o A233400     sr = isqrt(a)
%o A233400     return (a==sr*(sr+1))
%o A233400 for n in range(77777):
%o A233400     n3 = n*n*n
%o A233400     a = isqrt(n3)+1
%o A233400     if isTriangular(a*a-n3):  print(str(n), end=', ')
%Y A233400 Cf. A000217, A000290, A000578, A233401.
%K A233400 nonn
%O A233400 1,3
%A A233400 _Alex Ratushnyak_, Dec 09 2013