A384660 a(1) = 1. Thereafter a(n) = a(a(n-1)) if a(n-1) is a novel term, or n - S(n) if a(n-1) is a repeat term. S(n) is the sum of distinct terms in multiset {a(1),a(2),..a(n-1)}.
1, 1, 2, 1, 2, 3, 2, 2, 3, 4, 1, 2, 3, 4, 5, 2, 2, 3, 4, 5, 6, 3, 2, 3, 4, 5, 6, 7, 2, 2, 3, 4, 5, 6, 7, 8, 2, 2, 3, 4, 5, 6, 7, 8, 9, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2, 2, 3, 4, 5, 6, 7
Offset: 1
Examples
a(1) = 1 is a novel term so a(2) = a(a(1)) = 1, which is a repeat term so a(3) = 3 - 1 = 2, another novel term so a(4) = a(a(2)) = a(1) = 1.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Log log plot of a(n), n = 1..1000.
Crossrefs
Cf. A002260.
Programs
Extensions
More terms from Alois P. Heinz, Jun 06 2025
Comments