login
A188300
a(n) = [n*r] - [k*r] - [n*r-k*r], where r=1/sqrt(2), k=3, [ ]=floor.
3
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1
OFFSET
1
COMMENTS
See A188014.
LINKS
FORMULA
a(n) = [n*r] - [n*r-3*r] - [3*r], where r=1/sqrt(2).
a(n) = 1 iff the fractional part of n*r is less than that of k*r. - Charlie Neder, Dec 28 2018
MATHEMATICA
r=2^(-1/2); k=3;
t=Table[Floor[n*r]-Floor[n*r-k*r]-Floor[k*r], {n, 1, 220}] (* A188300 *)
Flatten[Position[t, 0] ] (* A188301 *)
Flatten[Position[t, 1] ] (* A188302 *)
PROG
(PARI) for(n=1, 100, print1(floor(n/sqrt(2)) - floor((n-3)/sqrt(2)) - floor(3/sqrt(2)), ", ")) \\ G. C. Greubel, Apr 13 2018
(Magma) [Floor(n/Sqrt(2)) - Floor((n-3)/Sqrt(2)) - Floor(3/Sqrt(2)): n in [1..100]]; // G. C. Greubel, Apr 13 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 27 2011
STATUS
approved