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

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

%S 3,6,10,13,17,21,24,27,31,35,39,42,45,49,53,56,60,63,66,71,74,78,81,

%T 84,89,92,95,99,103,106,110,113,117,121,124,128,131,134,139,142,146,

%U 149,152,157,160,163,167,170,174,178,181,185,188,192,196,199,202,207,210,213,217,220,225,228,231,235,238,242,246,249,252,256,260,264,267,270,274,278,281,285,288,292,296

%N a(n) = n + [n*s/r] + [n*t/r]; r=2, s=1+sqrt(2), t=1+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=1+sqrt(2), t=1+sqrt(3) gives f=A189524, g=A189525, h=A189526.

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

%t r=2; s=1+2^(1/2); t=1+3^(1/2);

%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}] (* A189524 *)

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

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

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

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

%Y Cf. A189525, A189526.

%K nonn

%O 1,1

%A _Clark Kimberling_, Apr 23 2011