This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A059648 #25 Aug 30 2022 02:22:46 %S A059648 0,0,1,0,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0, %T A059648 0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,0,0,0,1,0,1, %U A059648 0,0,1,0,1,0,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0 %N A059648 a(n) = [[(k^2)*n]-(k*[k*n])], where k = sqrt(2) and [] is the floor function. %C A059648 The values of (floor((k^2)*j)-(k*(floor(k*j)))) for j=0..20, with k=sqrt(2), are 0, 0.585786, 1.171572, 0.343144, 0.928930, 0.100502, 0.68629, 1.27207, 0.44365, 1.02943, 0.20100, 0.78679, 1.37258, 0.54415, 1.12993, 0.30151, 0.88729, 0.05886, 0.64465, 1.23044, 0.40201 %H A059648 G. C. Greubel, <a href="/A059648/b059648.txt">Table of n, a(n) for n = 0..10000</a> %p A059648 Digits := 89; floor_diffs_floored(sqrt(2),120); floor_diffs_floored := proc(k,upto_n) local j; [seq(floor(floor((k^2)*j)-(k*(floor(k*j)))),j=0..upto_n)]; end; %t A059648 With[{k = Sqrt[2]}, Table[Floor[Floor[k^2*j] - k*Floor[k*j]], {j, 0, 104}]] (* _Jean-François Alcover_, Mar 06 2016 *) %o A059648 (PARI) for(n=0, 100, print1(floor(floor(n*sqrt(2)^2) - sqrt(2)*floor(n*sqrt(2))), ", ")) \\ _G. C. Greubel_, Jan 27 2018 %o A059648 (Magma) [Floor(Floor(n*Sqrt(2)^2) - Sqrt(2)*Floor(n*Sqrt(2))): n in [0..100]]; // _G. C. Greubel_, Jan 27 2018 %o A059648 (Python) %o A059648 from math import isqrt %o A059648 def A059648(n): return (m:=n<<1)-1-isqrt(isqrt(n*m)**2<<1) if n else 0 # _Chai Wah Wu_, Aug 29 2022 %Y A059648 Cf. A007069. Positions of ones: A059649. %Y A059648 Cf. A002193 (sqrt(2)). %K A059648 nonn %O A059648 0,1 %A A059648 _Antti Karttunen_, Feb 03 2001