login
a(n) = n + [n*s/r] + [n*t/r]; r=2, s=sqrt(2), t=sqrt(3).
3

%I #9 Sep 08 2022 08:45:56

%S 1,4,7,9,12,15,17,19,22,25,27,30,33,35,37,40,43,45,48,51,53,56,58,60,

%T 63,66,69,71,74,76,78,81,84,87,89,92,95,96,99,102,104,107,110,113,114,

%U 117,120,122,125,128,131,133,135,138,140,143,146,149,151,153,156,158,161,164,166,169,172,174,176,179,182,184,187,190,192,194,197,200,202,205,208,210,212,215

%N a(n) = n + [n*s/r] + [n*t/r]; r=2, s=sqrt(2), t=sqrt(3).

%C This is one of three sequences that partition the positive integers. In general, suppose that r, s, t are positive real numbers for which the sets {i/r: i>=1}, {j/s: j>=1}, {k/t: k>=1} are pairwise disjoint. Let a(n) be the rank of n/r when all the numbers in the three sets are jointly ranked. Define b(n) and c(n) as the ranks of n/s and n/t. It is easy to prove that

%C f(n) = n + [n*s/r] + [n*t/r],

%C g(n) = n + [n*r/s] + [n*t/s],

%C h(n) = n + [n*r/t] + [n*s/t], where []=floor.

%C Taking r=2, s=sqrt(2), t=sqrt(3) gives f=A189367, g=A189368, h=A189369.

%H G. C. Greubel, <a href="/A189367/b189367.txt">Table of n, a(n) for n = 1..10000</a>

%t r = 2; s = Sqrt[2]; t = Sqrt[3];

%t f[n_] := n + Floor[n*s/r] + Floor[n*t/r];

%t g[n_] := n + Floor[n*r/s] + Floor[n*t/s];

%t h[n_] := n + Floor[n*r/t] + Floor[n*s/t]

%t Table[f[n], {n, 1, 120}] (* A189367 *)

%t Table[g[n], {n, 1, 120}] (* A189368 *)

%t Table[h[n], {n, 1, 120}] (* A189369 *)

%o (PARI) for(n=1,100, print1(n + floor(n*sqrt(2)/2) + floor(n*sqrt(3)/2), ", ")) \\ _G. C. Greubel_, Apr 20 2018

%o (Magma) [n + Floor(n*Sqrt(2)/2) + Floor(n*Sqrt(3)/2): n in [1..100]]; // _G. C. Greubel_, Apr 20 2018

%Y Cf. A189368, A189369.

%K nonn

%O 1,2

%A _Clark Kimberling_, Apr 20 2011