login
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
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, 10, 9, 8, 7, 9, 10, 13, 12, 11, 12, 12, 12, 11, 10, 11, 14, 13, 12, 11, 10, 9, 17, 16, 15, 16, 15, 16, 17, 16, 15, 14, 17, 16, 15, 14, 13, 12, 12, 11, 10, 16, 15, 16
OFFSET
0,2
COMMENTS
The number found after doing the steps is divisible by 4. - David A. Corneth, May 07 2018
From Robert G. Wilson v, May 12, 2018: (Start)
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, ..., .
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, ..., .
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]
(End)
LINKS
David A. Corneth, Table of n, a(n) for n = 0..9999 (first 351 terms from Peter Kagey)
Programing Puzzles & Code Golf Stack Exchange, Bringing a pair of integers to equality.
EXAMPLE
For n = 2, the 5 steps are: (0,2) -> (1,4) -> (2,5) -> (3,10) -> (6,11) -> (12,12).
MATHEMATICA
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 *)
CROSSREFS
Cf. A304027.
Sequence in context: A368741 A021740 A172370 * A110641 A121729 A072105
KEYWORD
nonn,look
AUTHOR
Peter Kagey, May 04 2018
STATUS
approved