[seqfan] Re: Add the biggest absent digit

Christian Perfect christianperfect at gmail.com
Tue Jul 21 16:53:42 CEST 2015


It's 123456798. Interesting!

Here's my Python code:

digits = '987654321'
s = '1'
while True:
    for d in digits:
        if d not in s:
            add = d
            break
    else:
        break
    s = str(int(s)+int(add))
print(s)

On Tue, 21 Jul 2015 at 15:31 Eric Angelini <Eric.Angelini at kntv.be> wrote:

> Hello SeqFans,
> What is the last term of this seq?
>
> -->Start with a(1)=1 and always
> add to a(n) the biggest digit not
> present in a(n).
>
> -->A=1,10,19,27,36,45,54,63,72,81,
> 90,98,105,...
>
> Example:
> The biggest digit not present in 98 is 7;
> 98+7=105.
>
> Best,
> É.
> Catapulté de mon aPhone
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list