login
A206807
Position of 3^n when {2^j} and {3^k} are jointly ranked; complement of A206805.
2
2, 5, 7, 10, 12, 15, 18, 20, 23, 25, 28, 31, 33, 36, 38, 41, 43, 46, 49, 51, 54, 56, 59, 62, 64, 67, 69, 72, 74, 77, 80, 82, 85, 87, 90, 93, 95, 98, 100, 103, 105, 108, 111, 113, 116, 118, 121, 124, 126, 129, 131, 134, 137, 139, 142, 144, 147, 149, 152, 155
OFFSET
1,1
COMMENTS
The joint ranking is for j >= 1 and k >= 1, so that the sets {2^j} and {3^k} are disjoint.
FORMULA
a(n) = n + floor(n*log_2(3)).
A206805(n) = n + floor(n*log_3(2)).
a(n) = n + A056576(n). - Michel Marcus, Dec 12 2023
a(n) = A098294(n) + 2*n - 1. - Ruud H.G. van Tol, Jan 22 2024
EXAMPLE
The joint ranking begins with 2,3,4,8,9,16,27,32,64,81,128,243,256, so that
A206805 = (1,3,4,6,8,9,11,13,...)
A206807 = (2,5,7,10,12,...)
MATHEMATICA
f[n_] := 2^n; g[n_] := 3^n; z = 200;
c = Table[f[n], {n, 1, z}]; s = Table[g[n], {n, 1, z}];
j = Sort[Union[c, s]];
p[n_] := Position[j, f[n]]; q[n_] := Position[j, g[n]];
Flatten[Table[p[n], {n, 1, z}]] (* A206805 *)
Table[n + Floor[n*Log[3, 2]], {n, 1, 50}] (* A206805 *)
Flatten[Table[q[n], {n, 1, z}]] (* this sequence *)
Table[n + Floor[n*Log[2, 3]], {n, 1, 50}] (* this sequence as a table *)
PROG
(PARI) a(n) = logint(3^n, 2) + n; \\ Ruud H.G. van Tol, Dec 10 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 16 2012
STATUS
approved