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!)
A304026 Starting from (0, n), the minimum number of applications of the map (x, y) -> (x + 1, 2*y) or (x, y) -> (2*x, y + 1) required to make both numbers in the pair equal. 2

%I #34 Nov 05 2023 21:30:43

%S 0,3,5,8,7,6,5,6,12,11,10,9,12,11,11,10,10,9,8,16,15,14,13,12,12,11,

%T 10,9,8,7,9,10,13,12,11,12,12,12,11,10,11,14,13,12,11,10,9,17,16,15,

%U 16,15,16,17,16,15,14,17,16,15,14,13,12,12,11,10,16,15,16

%N Starting from (0, n), the minimum number of applications of the map (x, y) -> (x + 1, 2*y) or (x, y) -> (2*x, y + 1) required to make both numbers in the pair equal.

%C The number found after doing the steps is divisible by 4. - _David A. Corneth_, May 07 2018

%C From _Robert G. Wilson v_, May 12, 2018: (Start)

%C Records: 3, 5, 8, 12, 16, 17, 19, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 57, 75, 102, ..., .

%C First occurrence of k=0,1,2,... or -1 if no such value exists: 0, -1, -1, 1, -1, 2, 5, 4, 3, 11, 10, 9, 8, 22, 21, 20, 19, 47, 88, 87, 109, 108, 107, 180, 216, 358, 356, 368, 689, 729, 730, 985, ..., .

%C Last occurrence of k=0,1,2,... or -1 if no such value exists: 1, -1, -1, 2, -1, 7, 8, 30, 29, 125, 127, 508, 507, 2043, 2046, ... . [It looks like these numbers need to be reduced by 1. - Editors, Jun 10 2018]

%C (End)

%H David A. Corneth, <a href="/A304026/b304026.txt">Table of n, a(n) for n = 0..9999</a> (first 351 terms from Peter Kagey)

%H Programing Puzzles & Code Golf Stack Exchange, <a href="https://codegolf.stackexchange.com/questions/164085/bringing-a-pair-of-integers-to-equality">Bringing a pair of integers to equality</a>.

%e For n = 2, the 5 steps are: (0,2) -> (1,4) -> (2,5) -> (3,10) -> (6,11) -> (12,12).

%t g[n_, k_] := Fold[ If[ Mod[#2, 2] == 0, 2 #, # + 1] &, n, k]; f[0] = 0; f[n_] := Block[{i = 1, id, idc}, While[id = IntegerDigits[i, 2]; idc = Mod[id + 1, 2]; 0 < Mod[i, 4] < 3 || g[0, id] != g[n, idc] && g[n, id] != g[0, idc], i++]; Length@ id]; Array[f, 69, 0] (* _Robert G. Wilson v_, May 08 2018 *)

%Y Cf. A304027.

%K nonn,look

%O 0,2

%A _Peter Kagey_, May 04 2018

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 September 14 06:05 EDT 2024. Contains 375911 sequences. (Running on oeis4.)