%I #14 Sep 04 2024 08:48:05
%S 1,2,2,3,3,2,3,3,2,2,3,3,2,3,3,2,2,3,3,2,3,3,2,3,3,2,2,3,3,2,3,3,2,2,
%T 3,3,2,3,3,2,3,3,2,2,3,3,2,3,3,2,2,3,3,2,3,3,2,2,3,3,2,3,3,2,3,3,2,2,
%U 3,3,2,3,3,2,2,3,3,2,3,3,2,3,3,2,2,3,3,2,3,3,2,2,3,3,2,3,3,2,2,3,3,2,3,3,2
%N a(n) = n - F(F(n)) where F(x)=floor(sqrt(2)*floor(x/sqrt(2))).
%C To built the sequence start from the infinite binary word b(k)=floor(k*(sqrt(2)-1))-floor((k-1)*(sqrt(2)-1)) for k>=1 giving 0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,... Then replace each 0 by the block {2,3,3} and each 1 by the block {2,2,3,3}. Append the initial string {1,2}.
%D B. Cloitre, On properties of irrational numbers related to the floor function, in preparation, 2005
%H G. C. Greubel, <a href="/A110012/b110012.txt">Table of n, a(n) for n = 1..10000</a>
%t F[x_] := Floor[Sqrt[2]*Floor[x/Sqrt[2]]]; Table[n - F[F[n]], {n, 1, 100}] (* _G. C. Greubel_, Oct 02 2018 *)
%o (PARI) F(x)=floor(sqrt(2)*floor(x/sqrt(2)));
%o a(n)=n-F(F(n))
%Y Cf. A003842 (case a(n)=n-floor(phi*floor(phi^-1*n))), A006337.
%K nonn,easy
%O 1,2
%A _Benoit Cloitre_, Sep 02 2005