login
A359221
Starting numbers which reach a new record high value when iterating the map x->A359194(x) (binary complement of 3n).
4
0, 1, 2, 3, 12, 28, 227, 821, 22246, 26494, 204953, 425720
OFFSET
1,3
COMMENTS
It is unknown whether all starting numbers reach 0.
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.
EXAMPLE
Let S(x) = iteration sequence of A359194 starting with x; then
S(0) = (0), maximum = 0;
S(1) = (1, 0), maximum = 1;
S(2) = (2, 1, 0), maximum = 2;
S(3) = (3, 6, 13, 24, 55, 90, 241, 300, 123, 142, 85, 0), maximum = 300;
Since S(3) contains a higher maximum than any lower positive starting integer, 3 is a term of this sequence.
PROG
(Python)
from itertools import count, islice
def f(n): return 1 if n == 0 else (m:=3*n)^((1 << m.bit_length())-1)
def itersmax(n):
i, fi, m = 0, n, n
while fi != 0: i, fi, m = i+1, f(fi), max(m, fi)
return i, m
def agen(): # generator of terms
record = -1
for m in count(0):
v, mx = itersmax(m)
if mx > record:
yield m # use mx to obtain values
record = mx
print(list(islice(agen(), 8))) # Michael S. Branicky, Dec 22 2022
KEYWORD
nonn,base,more,hard
AUTHOR
Joshua Searle, Dec 22 2022
STATUS
approved