Can you solve the Leonardo da Vinci riddle Tanya Khovanova

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.

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.

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

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.

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.

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.

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.

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.

The safe swings open,
and inside you find…

Da Vinci’s long-lost autobiography.

你找到了达芬奇的
秘密金库,

由一系列密码锁保护。

幸运的是,您的藏宝图
有三个代码:

1210、3211000

和……嗯。

最后一个似乎不见了。

看来
你得自己想办法了。

前两个数字有一些共同点:

它们就是所谓的
自传数字。

这是一种特殊类型的数字,
其结构描述了自身。

自传
数字的每个数字

表示

与该位置对应的数字
在该数字中出现的次数。

第一个数字
表示零的个数

,第二个数字表示
一个的个数

,第三个数字表示二的个数,
以此类推直到结束。

最后一把锁需要一个 10 位数的号码,

恰好有一个 10 位数的
自传号码。

它是什么?

如果您想
自己弄清楚,请在此处暂停!

答案:3

答案:2

答案:1

盲目地尝试不同的组合
将花费很长时间。

所以让我们分析一下
我们已经拥有

的自传数字,看看我们能找到什么样的模式。

通过将 1210 中的所有数字相加,

我们得到 4——数字的总数。

这是有道理的,
因为每个单独的数字都

告诉我们特定
数字在总数中出现的次数。

所以我们
十位自传中的数字

加起来必须是十。

这告诉我们另一个重要的事情

——数字不能有
太多的大数字。

例如,

如果它包括一个 6 和一个 7,

那么某个数字
必须出现 6 次,

而另一个数字必须出现 7

次——超过 10 个数字。

我们可以得出
结论,在整个序列中,

大于 5 的数字不能超过一位

因此,在 6、7、8 和 9 这四个数字中,

只有一个(如果有的话)会晋级。

并且未使用的数字对应的位置会出现零

所以现在我们知道我们的数字
必须至少包含三个零——

这也意味着前导
数字必须是 3 或更大。

现在,虽然第一个数字计算
零的数量,

但它后面的每个数字都计算
特定非零数字出现的次数。

如果我们将
除第一个数字之外的所有数字相加

——记住,
零不会增加总和——

我们会计
算出序列中出现了多少非零数字,

包括那个前导数字。

例如,
如果我们用第一个代码尝试这个,

我们得到 2 加 1 等于 3 位数。

现在,如果我们减去一个,

我们可以计算
出第一个数字之后有多少个非零数字——

在我们的例子中是两个。

为什么要经历这一切?

好吧,我们现在知道了一些重要的事情:

第一个数字之后出现的非零数字

的总数等于这些数字的总和
减去一。

你怎么能得到
一个总和正好比

加在一起的非零正整数的数量大 1 的分布?

唯一的方法是其中
一个加数为 2

,其余为 1。

多少个1?

原来只能有两个

——再多的话就需要额外的
数字,比如 3 或 4 来计算它们。

所以现在我们有 3 或更大的前导数字来
计算零,

一个 2 计算 1,

以及两个 1——

一个用来计算 2

,另一个用来计算前导数字。

说到这一点

,是时候
找出前导数字是什么了。

由于我们知道 2
和双 1 的和为 4,

我们可以从 10 中减去它得到 6。

现在
只需将它们全部放在适当的位置:

6 个零,

2 个

1,1 个

2,0 个 3,

0 个四分,

0 个五分,

1 个六分,

0 个

七分,0 个八分

和 0 个九分。

保险柜的秋千打开
,你会在里面找到……

达芬奇失传已久的自传。