# Stark VS Thanos

Thanos has invaded the Avengers. In the final standoff, Iron Man is off to fight the Mad Titan. Iron Man has created anti-infinity Stones to finish Thanos. But, the anti-Infinity stones can only be used together using a password. Iron Man has created a password of 6 numbers, where each number represents an anti-Infinity Stone.

 Iron Man only remembers 5 and has forgotten the 6th. What should be the 6th number so that the billionaire genius can destroy Thanos?

The first 5 numbers of the password are:

1210

2020

21200

3211000

42101000


What should be the final number for the password? (Iron Man needs to quickly remember the 6th number, before Thanos figures out the logic behind the password!!!)

• ...but it was too late... and the final words heard from humankind escaped the mouth of the Herculean being by the name of Thanos: "I am inevitable." SNAP xD – Mr Pie Apr 28 at 21:37
• I just hope that nobody hides an End Game spoiler in an answer's spoiler – Daniel Duque Apr 28 at 23:54
• Spoiler: rot13(uggcf://vzntrf-an.ffy-vzntrf-nznmba.pbz/vzntrf/V/614VCBh86dY._FL355_.wct) – Vilx- Apr 29 at 8:25

Gareth's reasoning is correct. However,

what he gave was the 7th number. There is another smaller number that fulfils the condition, and would thus be next in sequence: 521001000

• Ooops! I confess I assumed from the framing story that there were exactly six such numbers, so when I found another I assumed it was the next one. Good catch! – Gareth McCaughan Apr 29 at 12:35

The sixth number is

6210001000

and these are

numbers that count their own digits. So, e.g., 1210 has one 0, two 1s, one 2, zero threes.

• This is OEIS sequence A138480 – Chronocidal Apr 29 at 9:45
• Close call. You almost had it much like the Gauntlet from Thanos in Infinty War!! – chandrodoy banerjee Apr 29 at 12:34
• D'oh: if I'd thought to check OEIS I wouldn't have missed the fact that there's another smaller one :-). – Gareth McCaughan Apr 29 at 12:35