%I #18 Mar 04 2021 09:41:22
%S 1,2,3,2,5,3,7,4,3,2,11,6,13,7,5,8,17,3,19,4,7,2,23,12,5,13,9,14,29,6,
%T 31,16,11,17,7,6,37,19,3,8,41,14,43,4,15,2,47,24,7,25,17,26,53,27,5,8,
%U 19,29,59,12,61,31,9,8,13,33,67,4,23,14,71,18,73,37,15,19,11,6,79,20,9,41,83
%N a(1) = 1; for n > 1, a(n) = n divided by the most recently appearing divisor of n in all previous terms.
%C From _Michael De Vlieger_, Mar 03 2021: (Start)
%C Records are 1 and the primes, i.e., A008578.
%C 1 is the minimum, with occasions of the term 2 local minima.
%C a(p)=p since a(1)=1, the empty product, is the only available divisor in a(n) for 1 <= n <= p for any prime p, since p itself does not yet appear in the sequence, and p is coprime to all smaller n, i.e., gcd(p, n) = 1 for all n < p. As a consequence of a(p) = p, a(1) = 1 is the only appearance of 1 in the sequence.
%C a(p^2) = p, and generally, a(p^k) = p^e, 1 <= e < k, 1 < a(c) < c for composite c.
%C Trajectories visible in the scatterplot of a(n) pertain to d = n/a(n) and have origin (d, 1) and slope 1/d. Noncomposite trajectories d appear more continuous than composite trajectories, which exhibit a quasi-regular, exponential pattern of interruptions.
%C The plot of n at (x,y) = (a(n), n/a(n)) "unfolds" the scatterplot of this sequence. (End)
%H Michael De Vlieger, <a href="/A341679/b341679.txt">Table of n, a(n) for n = 1..10000</a>
%H Michael De Vlieger, <a href="/A341679/a341679_1.png">Annotated plot of n at (x,y) = (a(n), n/a(n))</a> for 1 <= x <= 139 and 1 <= y <= 99, showing noncomposite d = n/a(n) in red and composite d in blue, with n such that both a(n) and d noncomposite in black.
%H Michael De Vlieger, <a href="/A341679/a341679_2.png">Plot of n at (x,y) = (a(n), n/a(n))</a> for 1 <= x <= 960 and 1 <= y <= 960.
%H Michael De Vlieger, <a href="/A341679/a341679_3.png">Log-log plot of a(n)</a> for 1 <= n <= 2^20.
%H Scott R. Shannon, <a href="/A341679/a341679.png">Image for n=1..1000000</a>.
%F a(n) = n if n is prime.
%e a(4) = 2 as a(2) = 2 is the most recently occurring divisor of 4, thus a(4) = 4/2 = 2.
%e a(5) = 5 as the only divisor of 5 in the sequence is 1, thus a(5) = 5/1 = 5.
%e a(10) = 2 as a(5) = 5 is the most recently occurring divisor of 10, thus a(10) = 10/5 = 2.
%t Block[{a = {1}, k}, Do[k = 1; While[Mod[i, a[[-k]]] != 0, k++]; AppendTo[a, i/a[[-k]] ], {i, 2, 83}]; a] (* _Michael De Vlieger_, Feb 17 2021 *)
%t (* Second, faster program with memoized last indices of d | n *)
%t Block[{a = {1}, c, k}, c[1] = 1; Monitor[Do[AppendTo[a, Set[k, i/MaximalBy[Map[If[! IntegerQ@ c[#], {#, 0}, {#, c[#]}] &, Divisors[i]], Last][[1, 1]] ]]; c[k] = i , {i, 2, 10^4}], i]; a] (* _Michael De Vlieger_, Mar 03 2021 *)
%Y Cf. A027750, A000005, A020639, A032741, A096776.
%K nonn
%O 1,2
%A _Scott R. Shannon_, Feb 17 2021