OFFSET
1,2
EXAMPLE
Superimpose sequence and first differences:
Sequence.......: 1 3 7 12 18 27 37 38 40 45 51 60 61 63 67 72 80 89 90
First differences: .2.4.5..6..9..10.1..2..5..6..9..1..2..4..5..8..9..1..
Start with a(1)=1
+ add 2 [which is the smallest integer containing a digit not yet present in the sequence or in the first differences (0 cannot be added as the sequence is monotonic)]:
= we get a(2)=3;
+ add 4 [which is the smallest integer containing a digit not yet present in the sequence or in the first differences]:
= we get a(3)=7
+ add 5 [...]
= we get a(4)=12
+ add 6
= a(5)=18
+ add 9
= a(6)=27
+ add 10
= a(7)=37
We have used now all 10 digits, either in the sequence itself, or in the first differences. Let's introduce the "10-digit chunk" notion:
- the first "10-digit chunk" starts with a(1) and stops immediately after the last of the ten digits we had to include: so the first chunk is made by the (virtual) succession of [1,2,3,4,7,5,12,6,18,9,27,10];
- the second chunk is [37,1,38,2,40,5,45,6,51,9];
- the third chunk is [60,1,61,2,63,4,67,5,72,8,80,9];
- the fourth chunk is [89,1,90,2,92,3,95,4,99,6,105,7];
- ...
- the eighth chunk is [281,3,284,5,289,6,295,7,30]2 (yes, a chunk ends sometimes in the middle of a(n), here a(n)=302 -- thus the next chunk will also start in the middle of that a(n): [2,1,303...])
- etc.
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Aug 30 2005
STATUS
approved