%I #18 Jan 05 2023 18:55:58
%S 0,1,2,3,12,28,227,821,22246,26494,204953,425720
%N Starting numbers which reach a new record high value when iterating the map x->A359194(x) (binary complement of 3n).
%C It is unknown whether all starting numbers reach 0.
%C 103721 is not a term of this sequence despite having a trajectory of record length, because its maximum of 2.42...*10^14081 is lower than the previous record holder.
%H Joshua Searle, <a href="https://qedscience.wordpress.com/2021/02/19/collatz-inspired-sequences/">Collatz-inspired sequences</a>
%e Let S(x) = iteration sequence of A359194 starting with x; then
%e S(0) = (0), maximum = 0;
%e S(1) = (1, 0), maximum = 1;
%e S(2) = (2, 1, 0), maximum = 2;
%e S(3) = (3, 6, 13, 24, 55, 90, 241, 300, 123, 142, 85, 0), maximum = 300;
%e Since S(3) contains a higher maximum than any lower positive starting integer, 3 is a term of this sequence.
%o (Python)
%o from itertools import count, islice
%o def f(n): return 1 if n == 0 else (m:=3*n)^((1 << m.bit_length())-1)
%o def itersmax(n):
%o i, fi, m = 0, n, n
%o while fi != 0: i, fi, m = i+1, f(fi), max(m, fi)
%o return i, m
%o def agen(): # generator of terms
%o record = -1
%o for m in count(0):
%o v, mx = itersmax(m)
%o if mx > record:
%o yield m # use mx to obtain values
%o record = mx
%o print(list(islice(agen(), 8))) # _Michael S. Branicky_, Dec 22 2022
%Y Cf. A035327, A359194, A359207, A359208, A359209, A359215, A359218, A359219, A359220, A359222, A359255.
%K nonn,base,more,hard
%O 1,3
%A _Joshua Searle_, Dec 22 2022