[go: up one dir, main page]

login
A342873
Numbers whose distance to the nearest cube equals the distance to the nearest product of 3 consecutive integers (three-dimensional oblong).
1
0, 7, 16, 62, 92, 213, 276, 508, 616, 995, 1160, 1722, 1956, 2737, 3052, 4088, 4496, 5823, 6336, 7990, 8620, 10637, 11396, 13812, 14712, 17563, 18616, 21938, 23156, 26985, 28380, 32752, 34336, 39287, 41072, 46638, 48636, 54853, 57076, 63980, 66440, 74067
OFFSET
1,2
COMMENTS
That is, numbers k such that A074989(k) = A342872(k).
They form 2 partitions:
7, 62, 213, ... = 8*k^3 - k = k*A157914(k).
0, 16, 92, ... = 8*k^3 + 6*k^2 + 2*k = 2*k*A033951(k).
PROG
(Python)
def aupto(limit):
cubes = [k**3 for k in range(int((limit+1)**1/3)+2)]
proms = [k*(k+1)*(k+2) for k in range(int((limit+1)**1/3)+1)]
A074989 = [min(abs(n-c) for c in cubes) for n in range(limit+1)]
A342872 = [min(abs(n-p) for p in proms) for n in range(limit+1)]
return [m for m in range(limit+1) if A074989[m] == A342872[m]]
print(aupto(10**4)) # Michael S. Branicky, Mar 28 2021
KEYWORD
nonn,easy
AUTHOR
Lamine Ngom, Mar 28 2021
STATUS
approved