login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A188395
a(n) = [n*r +k*r]-[n*r]-[k*r], where r=1/sqrt(2), k=4, [ ]=floor.
3
1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1
OFFSET
1
COMMENTS
See A187950.
LINKS
FORMULA
a(n) = [n*r+4*r]-[n*r]-[4*r], where r=1/sqrt(2).
MATHEMATICA
r=2^(-1/2); k=4;
t=Table[Floor[n*r+k*r]-Floor[n*r]-Floor[k*r], {n, 1, 220}] (* A188395 *)
Flatten[Position[t, 0] ] (* A188396 *)
Flatten[Position[t, 1] ] (* A188397 *)
PROG
(PARI) for(n=1, 100, print1(floor((n+4)/sqrt(2)) - floor(n/sqrt(2)) - floor(4/sqrt(2)), ", ")) \\ G. C. Greubel, Apr 25 2018
(Magma) [Floor((n+4)/Sqrt(2)) - Floor(n/Sqrt(2)) - Floor(4/Sqrt(2)): n in [1..100]]; // G. C. Greubel, Apr 25 2018
CROSSREFS
Cf. A187950.
Sequence in context: A364250 A289748 A127254 * A266678 A267936 A263013
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 30 2011
STATUS
approved