Sunday, 19 February 2023

Midway Between Cubics and Pronics

Recently I posted about distances to cubic numbers (In the Vicinity of Cubic Numbers) as well as the product of three consecutive integers (Infinite Sums of Reciprocals of Pronic Numbers). These latter numbers are referred to variously as pronic, promic and oblong numbers. The number associated with my diurnal age today, 26985, involves both cubic and pronic numbers and qualifies it for inclusion in OEIS A342873:


 A342873

Numbers whose distance to the nearest cube equals the distance to the nearest product of 3 consecutive integers (three-dimensional oblong).



My approach to generating the terms of this sequence, using SageMath, was to first generate, separately, the sequence of cubic numbers and the sequence of oblong numbers up to a little over 42,000. 

The sequence of 36 cubic numbers (including zero) is:

0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728, 2197, 2744, 3375, 4096, 4913, 5832, 6859, 8000, 9261, 10648, 12167, 13824, 15625, 17576, 19683, 21952, 24389, 27000, 29791, 32768, 35937, 39304, 42875

The sequence of 36 oblong numbers (including zero) is:

0, 6, 24, 60, 120, 210, 336, 504, 720, 990, 1320, 1716, 2184, 2730, 3360, 4080, 4896, 5814, 6840, 7980, 9240, 10626, 12144, 13800, 15600, 17550, 19656, 21924, 24360, 26970, 29760, 32736, 35904, 39270, 42840, 46620

Combined these two sets of numbers together gives a total of 71 numbers since zero is duplicated:

0, 1, 6, 8, 24, 27, 60, 64, 120, 125, 210, 216, 336, 343, 504, 512, 720, 729, 990, 1000, 1320, 1331, 1716, 1728, 2184, 2197, 2730, 2744, 3360, 3375, 4080, 4096, 4896, 4913, 5814, 5832, 6840, 6859, 7980, 8000, 9240, 9261, 10626, 10648, 12144, 12167, 13800, 13824, 15600, 15625, 17550, 17576, 19656, 19683, 21924, 21952, 24360, 24389, 26970, 27000, 29760, 29791, 32736, 32768, 35904, 35937, 39270, 39304, 42840, 42875, 46620

Fortunately the order of these numbers, after zero, alternates from cubic to oblong and this algorithm was able to be applied in order to identify the numbers that satisfied the criterion imposed by OEIS A342873. These are the resulting numbers up to a little over 40,000:

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

For example, today's number of 26985 is a distance of 15 from the nearest cubic number (27000 = 30 x 30 x 30) and the same distance from the nearest oblong numbers (26970 = 29 x 30 x 31). 

Had the two sets of numbers become jumbled up when combined, the task of identifying suitable numbers would have been more difficult. However, the oblong numbers \(n \times (n+1) \times (n+2) \) are only a little ahead of corresponding cubic numbers (\(n^3 )\) and so the problem doesn't arise.

To see that the oblong number following the cube is always less than the next cube, consider the following:$$ \begin{align} n  (n+1) (n+2) &=n^3 + 3n^2 + 2n\\(n+1)^3&=n^3+3n^2+3n+1 \end{align}$$Clearly the next cubic number is always \(n+1\) ahead of the oblong number. The same reasoning would apply if we looked at numbers that are equidistant from the nearest square number and the nearest pronic number.

The earlier algorithm is easily modified to produce these numbers that constitute OEIS A074378:


 A074378

Numbers whose distance to nearest square number equals their distance to nearest pronic number.



The modified algorithm generates these numbers:

0, 3, 5, 14, 18, 33, 39, 60, 68, 95, 105, 138, 150, 189, 203, 248, 264, 315, 333, 390, 410, 473, 495, 564, 588, 663, 689, 770, 798, 885, 915, 1008, 1040, 1139, 1173, 1278, 1314, 1425, 1463, 1580, 1620, 1743, 1785, 1914, 1958, 2093, 2139, 2280, 2328, 2475, 2525, 2678, 2730, 2889, 2943, 3108, 3164, 3335, 3393, 3570, 3630, 3813, 3875, 4064, 4128, 4323, 4389, 4590, 4658, 4865, 4935, 5148, 5220, 5439, 5513, 5738, 5814, 6045, 6123, 6360, 6440, 6683, 6765, 7014, 7098, 7353, 7439, 7700, 7788, 8055, 8145, 8418, 8510, 8789, 8883, 9168, 9264, 9555, 9653, 9950, 10050, 10353, 10455, 10764, 10868, 11183, 11289, 11610, 11718, 12045, 12155, 12488, 12600, 12939, 13053, 13398, 13514, 13865, 13983, 14340, 14460, 14823, 14945, 15314, 15438, 15813, 15939, 16320, 16448, 16835, 16965, 17358, 17490, 17889, 18023, 18428, 18564, 18975, 19113, 19530, 19670, 20093, 20235, 20664, 20808, 21243, 21389, 21830, 21978, 22425, 22575, 23028, 23180, 23639, 23793, 24258, 24414, 24885, 25043, 25520, 25680, 26163, 26325, 26814, 26978, 27473, 27639, 28140, 28308, 28815, 28985, 29498, 29670, 30189, 30363, 30888, 31064, 31595, 31773, 32310, 32490, 33033, 33215, 33764, 33948, 34503, 34689, 35250, 35438, 36005, 36195, 36768, 36960, 37539, 37733, 38318, 38514, 39105, 39303, 39900, 40100

For example, the number 14 in this sequence is an equal distance from 12 = 3 x 4 and 16 = 4 x 4. The algorithm could be extended (permalink) the other way to find numbers that are equidistant from the nearest fourth power and the number that is a product of four consecutive integers. The initial resultant numbers are not a part of any OEIS sequence but they are as follows:

0, 20, 188, 308, 1068, 1488, 3560, 4568, 8960, 10940, 18948, 22380, 35588, 41048, 61328, 69488, 99000, 110628, 151820, 167780

For example the number 20 is equidistant from 16 = 2 x 2 x 2 x 2 and 24 = 1 x 2 x 3 x 4. The algorithm could be extended indefinitely but to little purpose. Nonetheless, it's been an interesting exercise.

No comments:

Post a Comment