OFFSET
1,1
LINKS
Reiner Moewald, Table of n, a(n) for n = 1..499
FORMULA
a(n) = (2*z^2 + 1 - (-1)^z)/4, where z = ceiling(sqrt(2)*n). - Giovanni Resta, Jan 10 2014
MATHEMATICA
a[n_] := Block[{z = Ceiling[Sqrt[2]*n]}, (1-(-1)^z+2*z^2)/4]; Array[a, 50] (* Giovanni Resta, Jan 10 2014 *)
PROG
(PARI) a(n)=(2*(sqrtint(2*n^2)+1)^2+2)\4 \\ Charles R Greathouse IV, Jan 10 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Reiner Moewald, Jan 04 2014
STATUS
approved