# Previous term + quantity of digits

Eric Angelini Eric.Angelini at kntv.be
Mon Aug 6 00:28:35 CEST 2007

```Hello SeqFans,
to compute the next term, add to n the term t -- t being the
quantity of [last digit of n] used so far in the sequence.

0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,23,25,27,29,31,38,41,49,52,

Example:

0,1,2,3,4,5,6,7,8,9,10,12

What follows 12?

Make 12 + (2 = quantity of "2" used so far in the seq.) = 14

What follows 31?

Make 31 + (7 = quantity of "1" used so far in the seq.) = 38

----

At any moment you can check how many digits of a certain kind
are used so far in the seq. with a simple substraction:

- Take two consecutive integers, say 49 and 52; substract them:
52-49=3; there are three "9" used so far in the seq.

- If you want to know, say, how many "7" are used in the range
0--52, go down from 52 to the first "7" (in "27"), substract
27 from the next term (29) and you have the answer : two "7"
are used between 0 and 52.

----

Could someone extend the seq if of interest?

Best,
E.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.seqfan.eu/pipermail/seqfan/attachments/20070806/437cd7ff/attachment.htm>
```