login
A188038
a(n) = [nr]-[kr]-[nr-kr], where r=sqrt(2), k=2, [ ]=floor.
4
1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0
OFFSET
1
COMMENTS
LINKS
FORMULA
a(n) = [n*r] - [2*r] - [(n-2)*r], where r=sqrt(2).
a(n) = A001951(n) - A001951(n-2) - 2. - R. J. Mathar, Jul 22 2020
MAPLE
A188038:=n->floor(n*sqrt(2))-floor(2*sqrt(2))-floor(n*sqrt(2) - 2*sqrt(2)); seq(A188038(n), n=1..100); # Wesley Ivan Hurt, Dec 02 2013
MATHEMATICA
r=2^(1/2)); k=2;
t=Table[Floor[n*r]-Floor[(n-k)*r]-Floor[k*r], {n, 1, 220}] (*A188038*)
Flatten[Position[t, 0]] (*A188039*)
Flatten[Position[t, 1]] (*A188040*)
PROG
(PARI) for(n=1, 30, print1(floor(n*sqrt(2)) - floor(2*sqrt(2)) - floor((n-2)*sqrt(2)), ", ")) \\ G. C. Greubel, Jan 31 2018
(Magma) [Floor(n*Sqrt(2)) - Floor(2*Sqrt(2)) - Floor((n-2)*Sqrt(2)): n in [1..30]]; // G. C. Greubel, Jan 31 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 19 2011
STATUS
approved