Showing posts with label non-prime digits. Show all posts
Showing posts with label non-prime digits. Show all posts

Tuesday, 28 April 2026

Four Special Xenodromes

The number associated with my diurnal age today (\( \textbf{28149} \)) has the property that it is a member of OEIS A365257. This sequence consists of numbers such that the five digits of the number and their four successive absolute first differences are all distinct.$$ \underbrace{|2-8|}_{6} \, \underbrace{|8-1|}_{7} \, \underbrace{|1-4|}_{3} \, \underbrace{|4-9|}_{5}$$I've written about this sequence before in a post titled Very Special Five Digit Numbers. In the range up to 40000, the only 96 such numbers (with 0 excluded) are:

14928, 15829, 17958, 18259, 18694, 18695, 19372, 19375, 19627, 25917, 27391, 27398, 28149, 28749, 28947, 34928, 35917, 37289, 37916, 38926, 39157, 39578, 43829, 45829, 47289, 47916, 49318, 49681, 49687, 51869, 53719, 57391, 57398, 58926, 59318, 59681, 59687, 61973, 61974, 62983, 62985, 67958, 68149, 68749, 68947, 69157, 69578, 71952, 71953, 72691, 72698, 74619, 74982, 74986, 75193, 75196, 76859, 78259, 78694, 78695, 81394, 81395, 81539, 82941, 82943, 85179, 85629, 85971, 85976, 86749, 87269, 87593, 87596, 89372, 89375, 89627, 91647, 91735, 92658, 92834, 92851, 92854, 93518, 94182, 94186, 94768, 94782, 94786, 95281, 95287, 95867, 96278, 96815, 97158, 98273, 98274

This got me wondering as to how many numbers there were such that the digits of the numbers contain the non-prime digits (1, 4, 6, 8 and 9) and the absolute differences between successive pairs of digits are the prime digits 2, 3, 5 and 7. It turns out that there are four such numbers (grouped into two palindromic pairs):$$ \begin{align} 18694 \rightarrow \underbrace{|1-8|}_{7} \, \underbrace{|8-6|}_{2} \, \underbrace{|6-9|}_{3} \, \underbrace{|9-4|}_{5}\\ \\49681 \rightarrow \underbrace{|4-9|}_{5} \, \underbrace{|9-6|}_{3} \, \underbrace{|6-8|}_{2} \, \underbrace{|8-1|}_{7}\\ \\94186 \rightarrow \underbrace{|9-4|}_{5} \, \underbrace{|4-1|}_{3} \, \underbrace{|1-8|}_{7} \, \underbrace{|8-6|}_{2} \\ \\68149 \rightarrow \underbrace{|6-8|}_{2} \, \underbrace{|8-1|}_{7} \, \underbrace{|1-4|}_{3} \, \underbrace{|4-9|}_{5} \end{align}$$If we allow the digit 0 to be one of the digits of the five digit number, then there are 56 additional numbers that satisfy:

Here are the 56 qualifying numbers, grouped by the position of the zero:

  • Zero in the 5th Position (Ends in 0)

14270, 14920, 14970, 16470, 16920, 16970, 31850, 35270, 38570, 79250

  • Zero in the 4th Position

18302, 24705, 42507, 42703, 49703, 61307, 63507, 64705, 68307, 68507, 69205, 69705, 81305, 94702

  • Zero in the 3rd Position (Middle)

13072, 25079, 27031, 27035, 35074, 47053, 53072, 57038, 83029, 83075, 83079, 85029, 85079, 92038, 92058, 97038, 97052, 97058

  • Zero in the 2nd Position

20381, 20749, 30724, 30794, 50296, 50318, 50742, 50746, 50796, 70316, 70386, 70524, 70536, 70586