login
Position of n^6 in the ordered union of {h^6, h >=1} and {3*k^6, k >=1}.
3

%I #16 Feb 19 2025 19:50:07

%S 1,3,5,7,9,10,12,14,16,18,20,21,23,25,27,29,31,32,34,36,38,40,42,43,

%T 45,47,49,51,53,54,56,58,60,62,64,65,67,69,71,73,75,76,78,80,82,84,86,

%U 87,89,91,93,95,97,98,100,102,104,106,108,109,111,113,115

%N Position of n^6 in the ordered union of {h^6, h >=1} and {3*k^6, k >=1}.

%C Let S = {h^6, h >=1} and T = {3*k^6, k >=1}. Then S and T are disjoint, with ordered union given by A249097. The position of n^6 is a(n), and the position of 3*n^6 is A249099(n).

%C Also, a(n) is the position of n in the joint ranking of the positive integers and the numbers k*3^(1/6), so that this sequence and A249099 are a pair of Beatty sequences.

%H Kevin Ryde, <a href="/A249098/b249098.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Be#Beatty">Index entries for sequences related to Beatty sequences</a>

%F a(n) = floor((1+1/3^(1/6)) * n). - _Kevin Ryde_, Feb 19 2025

%e {h^6, h >=1} = {1, 64, 729, 4096, 15625, 46656, 117649, ...};

%e {3*k^6, k >=1} = {3, 192, 2187, 12288, 46875, 139968, ...};

%e so the ordered union is {1, 3, 64, 192, 729, 2187, 4096, 12288, ...}, and

%e a(2) = 3 because 2^6 is in position 3.

%t z = 200; s = Table[h^6, {h, 1, z}]; t = Table[3*k^6, {k, 1, z}]; u = Union[s, t];

%t v = Sort[u] (* A249097 *)

%t m = Min[120, Position[v, 2*z^2]]

%t Flatten[Table[Flatten[Position[v, s[[n]]]], {n, 1, m}]] (* A249098 *)

%t Flatten[Table[Flatten[Position[v, t[[n]]]], {n, 1, m}]] (* A249099 *)

%o (PARI) a(n) = sqrtnint(n^6\3,6) + n; \\ _Kevin Ryde_, Feb 19 2025

%Y Cf. A249097, A249099.

%K nonn,easy,changed

%O 1,2

%A _Clark Kimberling_, Oct 21 2014