The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A059648 a(n) = [[(k^2)*n]-(k*[k*n])], where k = sqrt(2) and [] is the floor function. 6
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
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
LINKS
MAPLE
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;
MATHEMATICA
With[{k = Sqrt[2]}, Table[Floor[Floor[k^2*j] - k*Floor[k*j]], {j, 0, 104}]] (* Jean-François Alcover, Mar 06 2016 *)
PROG
(PARI) for(n=0, 100, print1(floor(floor(n*sqrt(2)^2) - sqrt(2)*floor(n*sqrt(2))), ", ")) \\ G. C. Greubel, Jan 27 2018
(Magma) [Floor(Floor(n*Sqrt(2)^2) - Sqrt(2)*Floor(n*Sqrt(2))): n in [0..100]]; // G. C. Greubel, Jan 27 2018
(Python)
from math import isqrt
def A059648(n): return (m:=n<<1)-1-isqrt(isqrt(n*m)**2<<1) if n else 0 # Chai Wah Wu, Aug 29 2022
CROSSREFS
Cf. A007069. Positions of ones: A059649.
Cf. A002193 (sqrt(2)).
Sequence in context: A188472 A286044 A129272 * A288707 A079261 A354028
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 03 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 07:04 EDT 2024. Contains 372579 sequences. (Running on oeis4.)