OFFSET
1,3
COMMENTS
The clause requiring a(n) = 1 if k*a(n-1) >= n is necessary to ensure continuation of the sequence, since without it there would be occasions of a(m) = a(a(m)) where a(m) is not yet defined, see Example. This is conjectured to occur infinitely many times as the sequence extends, which then implies that every positive integer will eventually enter the sequence (by incrementation of 1 if not before). Consequently every integer is conjectured to occur infinitely many times.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20.
EXAMPLE
a(1) = 1 is a novel term so a(2) = a(a(1)) = a(1) = 1. Then a(3) = 2*1 = 2 because 1 has occurred twice. a(4) = a(a(2)) = a(2) = 1, and so on.
The first occasion of invoking the "a(n) = 1" clause is following a(32) = 32, a novel term so then a(33) = 32, whereupon (without the clause) we would have require a(34) = 64 then a(35) = a(a(64)), where a(64) is not yet defined. To avoid this we set a(34) = 1 so that the sequence may continue.
MATHEMATICA
nn = 2^20; c[_] := 0; a[1] = 1; Do[j = a[n - 1]; If[# == 0, k = a[j], If[# < n, k = #, k = 1] &[(# + 1)*j] ] &[c[j]]; a[n] = k; c[j]++, {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Jun 30 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David James Sycamore, Oct 13 2024
EXTENSIONS
Corrected and extended by Michael De Vlieger, Jul 01 2025
STATUS
approved
