login
A188371
a(n) = [n*r] - [k*r] - [n*r-k*r], where r=1/sqrt(2), k=6, [ ]=floor.
3
0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1
OFFSET
1
COMMENTS
See A188014.
LINKS
FORMULA
a(n) = [n*r] - [6*r] - [n*r-6*r], where r=1/sqrt(2).
MATHEMATICA
r=2^(-1/2); k=6;
t=Table[Floor[n*r]-Floor[(n-k)*r]-Floor[k*r], {n, 1, 220}] (*A188371*)
Flatten[Position[t, 0]] (*A188372*)
Flatten[Position[t, 1]] (*A188373*)
PROG
(PARI) for(n-1, 100, print1(floor(n/sqrt(2)) - floor(6/sqrt(2)) - floor((n - 6)/sqrt(2)), ", ")) \\ G. C. Greubel, Apr 11 2018
(Magma) [Floor(n/Sqrt(2)) - Floor(6/Sqrt(2)) - Floor(n-6)/Sqrt(2)): n in [1..100]]; // G. C. Greubel, Apr 11 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 29 2011
STATUS
approved