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:






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!!!)

  • 4
    $\begingroup$ ...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 $\endgroup$
    – Mr Pie
    Apr 28, 2019 at 21:37
  • 17
    $\begingroup$ I just hope that nobody hides an End Game spoiler in an answer's spoiler $\endgroup$ Apr 28, 2019 at 23:54
  • 3
    $\begingroup$ Spoiler: rot13(uggcf://vzntrf-an.ffy-vzntrf-nznmba.pbz/vzntrf/V/614VCBh86dY._FL355_.wct) $\endgroup$
    – Vilx-
    Apr 29, 2019 at 8:25

2 Answers 2


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

  • $\begingroup$ 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! $\endgroup$
    – Gareth McCaughan
    Apr 29, 2019 at 12:35

The sixth number is


and these are

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.