[seqfan] Downgrade one of the digits of a(n-1)

Eric Angelini Eric.Angelini at kntv.be
Sun Nov 2 00:19:14 CET 2014

Hello SeqFans,
Start S with a(1)=1
Now a(n) is the smallest integer > 0 not yet in S such that a(n) shows at least
one of the digits of a(n-1), minus 1.


I guess S is a permutation of the non-
negative integers.

Why is a(2)=10?
Because a(2) must show at least one
of the digits of a(1), minus 1. And as
a(1) has only one digit, we'll get
1-1=0, this very 0 being the "new" digit that must be visible somewhere
in a(2). Thus a(2)=10 --- [10 being the 
smallest integer > 0 with "0", not yet 
present in S].

Why is a(3)=20?
Because, as we cannot subtract anything
from zero, we need again an integer
showing "0", this 0 being the result
of 1-1. And again, the smallest integer > 0
not yet in S and showing a 0 is 20.

Why is a(4)=11?
Because the term just before 11 is 20, and the "new" digit we get with
the "minus 1 operation" is 1, the
result of 2-1. the smallest integer
showing a "1" and not yet present in S
is 11.

Why is a(5)=30?
Because 11 (the previous term) will
produce "0" as "new" digit (1-1=0)
and 30 is the smallest unused integer > 0
so far that has a "0" somewhere.


When you have the choice, for the
"minus 1" operation, pick always
the digit of a(n-1) that will produce
the smallest possible a(n) "including" 
the "new" digit.


More information about the SeqFan mailing list