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!)
A325402 maxflip(n) = max(n, r(n)) where r(n) is the binary reverse of n. 2

%I #17 May 05 2019 10:07:32

%S 0,1,2,3,4,5,6,7,8,9,10,13,12,13,14,15,16,17,18,25,20,21,22,29,24,25,

%T 26,27,28,29,30,31,32,33,34,49,36,41,38,57,40,41,42,53,44,45,46,61,48,

%U 49,50,51,52,53,54,59,56,57,58,59,60,61,62,63

%N maxflip(n) = max(n, r(n)) where r(n) is the binary reverse of n.

%H Alois P. Heinz, <a href="/A325402/b325402.txt">Table of n, a(n) for n = 0..16384</a> (first 257 terms from Francois Alcover)

%F a(n) = max(n,A030101(n)).

%e a(10) = max(10, r(10))

%e = max(10, b'0101')

%e = max(10, 5)

%e = 10.

%e a(11) = max(11, r(11))

%e = max(11, b'1101')

%e = max(11, 13)

%e = 13.

%p a:= proc(n) local m, r; m:=n; r:=0;

%p while m>0 do r:=r*2+irem(m, 2, 'm') od;

%p max(n, r)

%p end:

%p seq(a(n), n=0..127); # _Alois P. Heinz_, Apr 23 2019

%o (PARI) a(n) = max(n, fromdigits(Vecrev(binary(n)), 2)); \\ _Michel Marcus_, Apr 24 2019

%Y Cf. A030101, A325401.

%Y Cf. A068637 (analog in base 10).

%K nonn,look,base

%O 0,3

%A _Francois Alcover_, Apr 23 2019

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 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)