|
EXAMPLE
|
Let F be the sequence of integers divisible by 7 or containing a digit 7 (A092433) with offset 1.
Sequence starts with the positive integers S.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, ...
Replace all integers in S that are also in F with the index of occurrence in F. Doing this gives:
1, 2, 3, 4, 5, 6, 1, 8, 9, 10, 11, 12, 13, 2, 15, 16, 3, 18, 19, 20, 4, 22, 23, 24, 25, 26, 5, 6, 29, 30, 31, 32, 33, 34, 7, 36, 8, 38, 39, 40, ...
At position 35, we see 7, which is the first element in F so we replace this 7 with 1. This gives:
1, 2, 3, 4, 5, 6, 1, 8, 9, 10, 11, 12, 13, 2, 15, 16, 3, 18, 19, 20, 4, 22, 23, 24, 25, 26, 5, 6, 29, 30, 31, 32, 33, 34, 1, 36, 8, 38, 39, 40, ...
Keep replacing numbers in S that are also in F with the index of occurrence they have in F. That is: if s in S is F(i) then set replace s with i.
|