login
A235204
Number of integer lattice points inside the square ABCD with side length n>0 with A(0|0), B(n*sqrt(2)/2| n*sqrt(2)/2), C(0| n*sqrt(2)) and D(-n*sqrt(2)/2| n*sqrt(2)/2).
1
2, 5, 13, 18, 32, 41, 50, 72, 85, 113, 128, 145, 181, 200, 242, 265, 313, 338, 365, 421, 450, 512, 545, 578, 648, 685, 761, 800, 882, 925, 968, 1058, 1105, 1201, 1250, 1301, 1405, 1458, 1568, 1625, 1682, 1800, 1861, 1985, 2048, 2178, 2245, 2312, 2450
OFFSET
1,1
LINKS
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
Sequence in context: A156013 A112634 A303281 * A354706 A348392 A264737
KEYWORD
nonn
AUTHOR
Reiner Moewald, Jan 04 2014
STATUS
approved