login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A359255 Number of steps to reach a maximum starting with n in the map x->A359194(x) (binary complement of 3n), or -1 if n goes to infinity. 6
0, 0, 0, 7, 8, 0, 6, 1, 2, 9, 0, 15, 28, 5, 1, 11, 12, 29, 10, 7, 8, 0, 2, 31, 4, 21, 5, 27, 2962, 1, 14, 23, 24, 2963, 22, 3, 8, 13, 6, 0, 0, 9, 0, 2961, 2, 33, 26, 11, 74, 4, 1591, 69, 20, 5, 3, 3, 34, 9, 30, 1, 16, 1, 76, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
The corresponding maxima reached are in A359208. The indices at which zeros appear here are in A359209.
LINKS
MATHEMATICA
f[n_] := FromDigits[BitXor[1, IntegerDigits[3*n, 2]], 2]; Table[c=m=0; n=r=i; While[n!=0, c++; n=f[n]; If[n>r, m=c; r=n]]; m, {i, 0, 63}]
PROG
(Python)
def f(n): return 1 if n == 0 else (m:=3*n)^((1 << m.bit_length())-1)
def a(n):
i, fi, m, mi = 0, n, n, 0
while fi != 0:
i, fi = i+1, f(fi)
if fi > m: m, mi = fi, i
return mi
print([a(n) for n in range(64)]) # Michael S. Branicky, Dec 22 2022
CROSSREFS
Sequence in context: A333972 A088396 A199723 * A188485 A093828 A010514
KEYWORD
nonn,base
AUTHOR
Hans Havermann, Dec 22 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)