%I #35 Jan 25 2024 07:09:01
%S 2,5,7,10,12,15,18,20,23,25,28,31,33,36,38,41,43,46,49,51,54,56,59,62,
%T 64,67,69,72,74,77,80,82,85,87,90,93,95,98,100,103,105,108,111,113,
%U 116,118,121,124,126,129,131,134,137,139,142,144,147,149,152,155
%N Position of 3^n when {2^j} and {3^k} are jointly ranked; complement of A206805.
%C The joint ranking is for j >= 1 and k >= 1, so that the sets {2^j} and {3^k} are disjoint.
%F a(n) = n + floor(n*log_2(3)).
%F A206805(n) = n + floor(n*log_3(2)).
%F a(n) = n + A056576(n). - _Michel Marcus_, Dec 12 2023
%F a(n) = A098294(n) + 2*n - 1. - _Ruud H.G. van Tol_, Jan 22 2024
%e The joint ranking begins with 2,3,4,8,9,16,27,32,64,81,128,243,256, so that
%e A206805 = (1,3,4,6,8,9,11,13,...)
%e A206807 = (2,5,7,10,12,...)
%t f[n_] := 2^n; g[n_] := 3^n; z = 200;
%t c = Table[f[n], {n, 1, z}]; s = Table[g[n], {n, 1, z}];
%t j = Sort[Union[c, s]];
%t p[n_] := Position[j, f[n]]; q[n_] := Position[j, g[n]];
%t Flatten[Table[p[n], {n, 1, z}]] (* A206805 *)
%t Table[n + Floor[n*Log[3, 2]], {n, 1, 50}] (* A206805 *)
%t Flatten[Table[q[n], {n, 1, z}]] (* this sequence *)
%t Table[n + Floor[n*Log[2, 3]], {n, 1, 50}] (* this sequence as a table *)
%o (PARI) a(n) = logint(3^n, 2) + n; \\ _Ruud H.G. van Tol_, Dec 10 2023
%Y Cf. A006899, A056576, A098294, A206805, A122437.
%K nonn
%O 1,1
%A _Clark Kimberling_, Feb 16 2012
|