OFFSET
1,2
COMMENTS
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 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
a(n)=n+[ns/r]+[nt/r],
b(n)=n+[nr/s]+[nt/s],
c(n)=n+[nr/t]+[ns/t], where []=floor.
Taking r = sqrt(2) - 1, s = sqrt(2), t = sqrt(2) + 1 yields
FORMULA
a(n) = n + floor(ns/r) + floor(nt/r), where r = sqrt(2) - 1, s = sqrt(2), t = sqrt(2) + 1.
MATHEMATICA
r = Sqrt[2] - 1; s = Sqrt[2]; t = Sqrt[2] + 1;
a[n_] := n + Floor[n*s/r] + Floor[n*t/r];
b[n_] := n + Floor[n*r/s] + Floor[n*t/s];
c[n_] := n + Floor[n*r/t] + Floor[n*s/t]
Table[a[n], {n, 1, 120}] (* A330171 *)
Table[b[n], {n, 1, 120}] (* A016789 *)
Table[c[n], {n, 1, 120}] (* A330172 *)
Table[n+Floor[(n(Sqrt[2]-1))/(Sqrt[2]+1)]+Floor[(n Sqrt[2])/(Sqrt[2]+1)], {n, 70}] (* Harvey P. Dale, Feb 10 2023 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 04 2020
STATUS
approved