cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A359208 Maximum value reached when starting from n during iteration of the map x->A359194(x) (binary complement of 3n), or -1 if infinite.

This page as a plain text file.
%I A359208 #41 Jan 11 2023 11:09:26
%S A359208 0,1,2,300,300,5,300,10,10,300,10,300,328536,300,21,300,300,328536,
%T A359208 300,300,300,21,72,328536,300,328536,661,328536,
%U A359208 123130640068522377168864228132316865867184046004226894,40,300,328536,328536
%N A359208 Maximum value reached when starting from n during iteration of the map x->A359194(x) (binary complement of 3n), or -1 if infinite.
%C A359208 It is unknown whether any terms are -1. The next term a(33) is equal to a(28), a 54-digit number. a(425720) is >= 2.09 * 10^114778, unresolved after 10^10 iterations.
%C A359208 a(425720) = 7.14... * 10^179246. - _Joshua Searle_, Jan 10 2023
%H A359208 Rémy Sigrist, <a href="/A359208/b359208.txt">Table of n, a(n) for n = 0..10000</a>
%H A359208 Joshua Searle, <a href="https://qedscience.wordpress.com/2021/02/19/collatz-inspired-sequences/">Collatz-inspired sequences</a>
%e A359208 a(3) = 300 because the largest term in the iterated sequence: (3, 6, 13, 24, 55, 90, 241, 300, 123, 142, 85, 0) is 300.
%t A359208 f[n_] := BitXor[3 n, 2^IntegerPart[Log2[3 n] + 1] - 1]; Table[Max@ NestWhileList[f, n, # != 0 &], {n, 0, 32}] (* _Michael De Vlieger_, Dec 21 2022 *)
%o A359208 (Python)
%o A359208 def f(n): return 1 if n == 0 else (m:=3*n)^((1 << m.bit_length())-1)
%o A359208 def a(n):
%o A359208     i, fi, m = 0, n, n
%o A359208     while fi != 0: i, fi, m = i+1, f(fi), max(m, fi)
%o A359208     return m
%o A359208 print([a(n) for n in range(33)]) # _Michael S. Branicky_, Dec 20 2022
%o A359208 (PARI) f(n) = if(n, bitneg(n, exponent(n)+1), 1); \\ A035327
%o A359208 a(n) = my(x=n, m=n); while (m, m=f(3*m); if (m>x, x=m)); x; \\ _Michel Marcus_, Dec 21 2022
%Y A359208 Cf. A359194, A359207, A359209, A359215, A359218, A359219, A359220, A359221, A359222, A359255.
%K A359208 nonn,base
%O A359208 0,3
%A A359208 _Joshua Searle_, Dec 20 2022