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.
%I A342873 #16 Mar 31 2021 20:29:53 %S A342873 0,7,16,62,92,213,276,508,616,995,1160,1722,1956,2737,3052,4088,4496, %T A342873 5823,6336,7990,8620,10637,11396,13812,14712,17563,18616,21938,23156, %U A342873 26985,28380,32752,34336,39287,41072,46638,48636,54853,57076,63980,66440,74067 %N A342873 Numbers whose distance to the nearest cube equals the distance to the nearest product of 3 consecutive integers (three-dimensional oblong). %C A342873 That is, numbers k such that A074989(k) = A342872(k). %C A342873 They form 2 partitions: %C A342873 7, 62, 213, ... = 8*k^3 - k = k*A157914(k). %C A342873 0, 16, 92, ... = 8*k^3 + 6*k^2 + 2*k = 2*k*A033951(k). %o A342873 (Python) %o A342873 def aupto(limit): %o A342873 cubes = [k**3 for k in range(int((limit+1)**1/3)+2)] %o A342873 proms = [k*(k+1)*(k+2) for k in range(int((limit+1)**1/3)+1)] %o A342873 A074989 = [min(abs(n-c) for c in cubes) for n in range(limit+1)] %o A342873 A342872 = [min(abs(n-p) for p in proms) for n in range(limit+1)] %o A342873 return [m for m in range(limit+1) if A074989[m] == A342872[m]] %o A342873 print(aupto(10**4)) # _Michael S. Branicky_, Mar 28 2021 %Y A342873 Cf. A074989, A342872. %Y A342873 Cf. A157914, A033951, A074378, A201053, A000578, A007531, A081134. %K A342873 nonn,easy %O A342873 1,2 %A A342873 _Lamine Ngom_, Mar 28 2021