Among all five digit numbers, the number 26840 has the very obvious but relatively rare property that it contains all the even digits 0, 2, 4, 6 and 8. It's so obvious that it's easy to miss. I'd noticed the property earlier in the day when I was analysing the number because it represents my diurnal age and didn't give it much thought. It was later in the day that it struck me that such an occurrence is not all that common in the span of all five digit numbers from 10000 to 99999.
In fact there are only 96 such numbers because the first digit cannot be zero so there are only four possible digits to place there. Having put one of the even digits in the first position, the second position can be filled in four ways, the next in three etc. Thus we 4 x 4 x 3 x 2 x 1 = 96. Here are the numbers in order from lowest to highest:
20468, 20486, 20648, 20684, 20846, 20864, 24068, 24086, 24608, 24680, 24806, 24860, 26048, 26084, 26408, 26480, 26804, 26840, 28046, 28064, 28406, 28460, 28604, 28640, 40268, 40286, 40628, 40682, 40826, 40862, 42068, 42086, 42608, 42680, 42806, 42860, 46028, 46082, 46208, 46280, 46802, 46820, 48026, 48062, 48206, 48260, 48602, 48620, 60248, 60284, 60428, 60482, 60824, 60842, 62048, 62084, 62408, 62480, 62804, 62840, 64028, 64082, 64208, 64280, 64802, 64820, 68024, 68042, 68204, 68240, 68402, 68420, 80246, 80264, 80426, 80462, 80624, 80642, 82046, 82064, 82406, 82460, 82604, 82640, 84026, 84062, 84206, 84260, 84602, 84620, 86024, 86042, 86204, 86240, 86402, 86420
I'll only see another six such numbers in my lifetime: 28046, 28064, 28406, 28460, 28604, 28640. Here is a permalink to the SageMath algorithm that I used to generate these numbers. This got me thinking about the 120 five digit numbers that contain only the odd digits: 1, 3, 5, 7 and 9. The algorithm is easily modified to generate these numbers (permalink). Here are the numbers:
13579, 13597, 13759, 13795, 13957, 13975, 15379, 15397, 15739, 15793, 15937, 15973, 17359, 17395, 17539, 17593, 17935, 17953, 19357, 19375, 19537, 19573, 19735, 19753, 31579, 31597, 31759, 31795, 31957, 31975, 35179, 35197, 35719, 35791, 35917, 35971, 37159, 37195, 37519, 37591, 37915, 37951, 39157, 39175, 39517, 39571, 39715, 39751, 51379, 51397, 51739, 51793, 51937, 51973, 53179, 53197, 53719, 53791, 53917, 53971, 57139, 57193, 57319, 57391, 57913, 57931, 59137, 59173, 59317, 59371, 59713, 59731, 71359, 71395, 71539, 71593, 71935, 71953, 73159, 73195, 73519, 73591, 73915, 73951, 75139, 75193, 75319, 75391, 75913, 75931, 79135, 79153, 79315, 79351, 79513, 79531, 91357, 91375, 91537, 91573, 91735, 91753, 93157, 93175, 93517, 93571, 93715, 93751, 95137, 95173, 95317, 95371, 95713, 95731, 97135, 97153, 97315, 97351, 97513, 97531
So getting back to 26840, it's special because it contains all the even digits exactly once. There are only 96 such numbers and so that makes this number rather special.
No comments:
Post a Comment