OFFSET
1,1
COMMENTS
As n increases the terms generally remain scattered between 1 and n - see the linked image. However also present are lines of various gradients along which numerous terms are concentrated. These correspond to the distances back from a(n) to the last appearance of the terms like 1,2,3. These small terms become rare as n increases, e.g., in the first 10 millions terms, a(2849898) = 1 but then 1 does not appear again until a(6839757) = 1. In that range all terms where n is prime will have a(n) = n - 2849898.
LINKS
Scott R. Shannon, Image of the first 10^6 terms.
EXAMPLE
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.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Oct 07 2021
STATUS
approved