There are several so-called "self-describing" or "[[wp:Self-descriptive number|self-descriptive]]" integers.

An integer is said to be "self-describing" if it has the property that, when digit positions are labeled 0 to N-1, the digit in each position is equal to the number of times that that digit appears in the number.

For example, &nbsp; '''2020''' &nbsp; is a four-digit self describing number:

* &nbsp; position &nbsp; 0 &nbsp; has value &nbsp; 2 &nbsp; and there are two 0s in the number;
* &nbsp; position &nbsp; 1 &nbsp; has value &nbsp; 0 &nbsp; and there are no 1s in the number;
* &nbsp; position &nbsp; 2 &nbsp; has value &nbsp; 2 &nbsp; and there are two 2s;
* &nbsp; position &nbsp; 3 &nbsp; has value &nbsp; 0 &nbsp; and there are zero 3s.

<br>
Self-describing numbers < 100.000.000&nbsp; are: &nbsp; &nbsp; 1210, &nbsp; 2020, &nbsp; 21200, &nbsp; 3211000, &nbsp; 42101000.


;Task Description
# Write a function/routine/method/... that will check whether a given positive integer is self-describing.
# As an optional stretch goal - generate and display the set of self-describing numbers.


;Related tasks:
* &nbsp; [[Fours is the number of letters in the ...]]
* &nbsp; [[Look-and-say sequence]]
* &nbsp; [[Number names]]
* &nbsp; [[Self-referential sequence]]
* &nbsp; [[Spelling of ordinal numbers]]
<br><br>

