OFFSET
1,4
MATHEMATICA
Accumulate[Table[Floor[Sqrt[2]n]-2Floor[n/Sqrt[2]], {n, 120}]] (* Harvey P. Dale, Mar 08 2017 *)
PROG
(PARI) first(n)=my(s); vector(n, k, s+=a(n)=sqrtint(2*k^2)%2) \\ Charles R Greathouse IV, Sep 02 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 17 2003
STATUS
approved