login
A377027
a(1) = 1. For n > 1, if a(n-1) is a novel term, a(n) = a(a(n-1)), and if a(n-1) seen k (>1) times (including a(n-1)), with k*a(n-1) < n then a(n) = k*a(n-1); else a(n) = 1.
2
1, 1, 2, 1, 3, 2, 4, 1, 4, 8, 1, 5, 3, 6, 2, 6, 12, 5, 10, 8, 16, 6, 18, 5, 15, 2, 8, 24, 5, 20, 8, 1, 6, 24, 1, 7, 4, 12, 24, 1, 8, 40, 1, 9, 4, 16, 32, 1, 10, 20, 40, 1, 11, 1, 12, 36, 7, 14, 6, 30, 20, 60, 30, 60, 1, 13, 3, 9, 18, 36, 1, 14, 28, 24, 1, 15, 30
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, 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
Cf. A376908.
Sequence in context: A003960 A243499 A124223 * A379730 A295908 A300980
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Corrected and extended by Michael De Vlieger, Jul 01 2025
STATUS
approved