You’ve found Leonardo Da Vinci’s secret vault, secured by a series of combination locks. Fortunately, your treasure map has three codes: 1210, 3211000, and… hmm. The last one appears to be missing. Looks like you’re gonna have to figure it out on your own.
Encontraste la guarida secreta de Leonardo Da Vinci, asegurada por una serie de candados de combinaciones. Por suerte, tu mapa del tesoro tiene tres códigos: 1210, 3211000, y... hmm. El último parece haber desaparecido. Parece que tendrás que descubrirlo por tu cuenta.
There’s something those first two numbers have in common: they’re what’s called autobiographical numbers. This is a special type of number whose structure describes itself. Each of an autobiographical number’s digits indicates how many times the digit corresponding to that position occurs within the number. The first digit indicates the quantity of zeroes, the second digit indicates the number of ones, the third digit the number of twos, and so on until the end.
Hay algo que estos dos primeros números tienen en común: son lo que llamamos números autobiográficos. Esto es un tipo especial de número cuya estructura los describe a sí mismos. Cada uno de los dígitos del número autobiográfico indica cuántas veces el dígito corresponde a la posición que ocupa dentro del número. El primer dígito indica la cantidad de ceros, el segundo dígito indica el número de unos, el tercer número indica el número de dos y así hasta el final.
The last lock takes a 10 digit number, and it just so happens that there’s exactly one ten-digit autobiographical number. What is it? Pause here if you want to figure it out for yourself! Answer in: 3 Answer in: 2 Answer in: 1
El último candado necesita un número de 10 dígitos, y simplemente ocurre que justo hay un número autobiográfico de 10 dígitos. ¿Cuál es? ¡Pausa aquí si quieres resolverlo por tu cuenta! Respuesta en: 3 Respuesta en: 2 Respuesta en: 1
Blindly trying different combinations would take forever. So let’s analyze the autobiographical numbers we already have to see what kinds of patterns we can find. By adding all the digits in 1210 together, we get 4 – the total number of digits. This makes sense since each individual digit tells us the number of times a specific digit occurs within the total. So the digits in our ten-digit autobiographical number must add up to ten.
Intentar a lo loco diferentes combinaciones sería eterno. Así que analicemos los números autobiográficos que ya tenemos para ver qué tipo de patrones podemos encontrar. Sumando todos los dígitos de 1210 obtenemos 4, el número total de dígitos Esto tiene sentido ya que cada dígito individual nos dice el número específico de veces que ese dígito aparece en el total. Así que los dígitos del número de 10 dígitos autobiográfico deben sumar hasta 10.
This tells us another important thing – the number can’t have too many large digits. For example, if it included a 6 and a 7, then some digit would have to appear 6 times, and another digit 7 times– making more than 10 digits. We can conclude that there can be no more than one digit greater than 5 in the entire sequence. So out of the four digits 6, 7, 8, and 9, only one – if any-- will make the cut. And there will be zeroes in the positions corresponding to the numbers that aren’t used. So now we know that our number must contain at least three zeroes – which also means that the leading digit must be 3 or greater.
Esto nos dice otra cosa importante... los números no pueden tener dígitos muy grandes. Por ejemplo, si incluyes un 6 y un 7, entonces algunos dígitos deberían aparecer 6 veces, y otro dígito 7 veces, consiguiendo más de 10 dígitos. Podemos concluir que no puede haber más de un dígito mayor de 5 en la secuencia completa. Entonces de los cuatro dígitos 6, 7, 8 y 9, solo uno, si alguno, pasará el corte. Y habrá ceros en las posiciones correspondientes a los números que no estamos usando. Ahora sabemos que nuestro número debe contener al menos tres ceros lo que también significa que el primer dígito debe ser 3 o mayor.
Now, while this first digit counts the number of zeroes, every digit after it counts how many times a particular non-zero digit occurs. If we add together all the digits besides the first one – and remember, zeroes don’t increase the sum – we get a count of how many non-zero digits appear in the sequence, including that leading digit. For example, if we try this with the first code, we get 2 plus 1 equals 3 digits. Now, if we subtract one, we have a count of how many non-zero digits there are after the first digit – two, in our example.
Ahora, mientras el primer dígito cuenta el número de ceros, cada dígito detrás cuenta cuántas veces aparece un dígito diferente de cero. Y si sumamos todos los dígitos junto con el primero, y recuerda, los ceros no incrementan la suma, tenemos un recuento de cuántos dígitos diferentes a cero aparecen, incluyendo el primer dígito. Por ejemplo, si probamos con el primer código, tenemos 2 + 1 = 3 dígitos. Bien, si restamos uno, tenemos un recuento de los dígitos diferentes a cero tras el primer dígito, dos, en nuestro ejemplo.
Why go through all that? Well, we now know something important: the total quantity of non-zero digits that occur after the first digit is equal to the sum of these digits, minus one. And how can you get a distribution where the sum is exactly 1 greater than the number of non-zero positive integers being added together? The only way is for one of the addends to be a 2, and the rest 1s. How many 1s? Turns out there can only be two – any more would require additional digits like 3 or 4 to count them.
¿Para qué hacer todo esto? Bueno, ahora sabemos algo importante: la cantidad total de dígitos diferentes a cero que hay tras el primer dígito es igual a la suma de estos dígitos menos uno. ¿Y cómo conseguir un reparto donde la suma es exactamente en uno mayor que el número de no-ceros enteros positivos que se suman? La única manera es que uno de los sumandos sea 2, y el resto unos. ¿Cuántos unos? Resulta que solo puede haber dos, más requeriría dígitos adicionales como 3 o 4 para el recuento.
So now we have the leading digit of 3 or greater counting the zeroes, a 2 counting the 1s, and two 1s – one to count the 2s and another to count the leading digit. And speaking of that, it’s time to find out what the leading digit is. Since we know that the 2 and the double 1s have a sum of 4, we can subtract that from 10 to get 6. Now it’s just a matter of putting them all in place: 6 zeroes, 2 ones, 1 two, 0 threes, 0 fours, 0 fives, 1 six, 0 sevens, 0 eights, and 0 nines.
Ahora tenemos el primer dígitos de 3 o número mayor contando los ceros, un 2 contando los unos, y dos números 1, uno contando el 2 y otro contando el primer dígito. Y hablando de eso, es hora de descubrir cuál es el primer dígito. Como sabemos que el 2 y el doble de 1 suman 4, podemos restar eso a 10 para obtener 6. Ahora es cuestión de ponerlos todos en su sitio: 6 ceros, 2 unos, 1 dos, 0 tres, 0 cuatros, 0 cincos, 1 seis, 0 sietes, 0 ochos, y 0 nueves.
The safe swings open, and inside you find... Da Vinci’s long-lost autobiography.
La puerta de seguridad se abre y dentro encuentras... la autobiografía largamente perdida de Da Vinci.