OFFSET
1,4
COMMENTS
a(1)=0 by definition.
The idea behind the sequence was originally proposed at http://www.sanaristikot.net on Aug 19 2015 by Jaska Himberg.
LINKS
Yi Yang, Table of n, a(n) for n = 1..10000
V. J. Pohjola ("Olavi Kivalo") and Jaakko Himberg ("Jaska"), 8545.Lukujono16
Giovanni Resta, Representation of a(3)-a(11)
MATHEMATICA
c[n_, i_, j_] := Ceiling[Sqrt[(n - 2 i)^2 + (n - 2 j)^2]];
t1[q_] := Take[q, 1]; t2[p_] := Take[p, -1]; p2[r_] := Power[r, 2];
area = {}; (Do[
a = {}; (Do[
If[c[n, i, j] == n || c[n, i, j] == n - 1 || c[n, i, j] == n - 2,
AppendTo[a, {i, j}]], {i, 1, Ceiling[n/2 (1 - Sqrt[2]/2)]}, {j, i,
Floor[n/2]}]);
b = (n - 2*Map[t2, Flatten[Map[t1, GatherBy[a, First]], 1]]);
sum1 = 4*Apply[Plus, Drop[b, -1]]; sum2 = Map[p2, Last[b]];
AppendTo[area, (sum1 + sum2)], {n, 2, 100}]);
Flatten[{0, area}]
a[1] = 0; a[n_] := If[EvenQ[n], 4 Sum[ Floor[ Sqrt[(n/2)^2 - k^2]], {k, n/2}], 4 Floor[n/2] - 3 + 4 Sum[Floor[-1/2 + Sqrt[(n/2)^2 - (k + 1/2)^2]], {k, n/2 - 1}]]; Array[a, 60] (* Giovanni Resta, Sep 10 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
V.J. Pohjola, Sep 03 2015
STATUS
approved