A348217 a(1) = 2; for n > 1, let d be the largest divisor of n appearing in all previous terms and k the largest value such that a(k) = d, then a(n) = n - k.
2, 1, 1, 3, 2, 2, 4, 1, 5, 1, 1, 5, 2, 1, 3, 9, 3, 2, 5, 1, 4, 4, 3, 2, 6, 2, 11, 6, 9, 2, 11, 10, 2, 1, 16, 7, 3, 5, 2, 8, 7, 1, 1, 13, 16, 7, 4, 3, 3, 18, 2, 8, 10, 4, 24, 4, 8, 7, 16, 7, 18, 11, 34, 5, 21, 4, 24, 5, 20, 17, 28, 5, 30, 23, 3, 10, 15, 34, 36, 11, 52, 31, 40, 13, 15, 35, 12, 8
Offset: 1
Keywords
Examples
a(2) = 1 as the largest divisor of 2 so far appearing is 2, and that is 2 - 1 = 1 term back from 2. a(3) = 1 as the largest divisor of 3 so far appearing is 1, and that is 3 - 2 = 1 term back from 3. a(4) = 3 as the largest divisor of 4 so far appearing is 2, and that is 4 - 1 = 3 terms back from 4. a(5) = 2 as the largest divisor of 5 so far appearing is 1, and that is 5 - 3 = 2 terms back from 5.
Links
- Scott R. Shannon, Image of the first 10^6 terms.
Comments