login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261849 Number of squares in an n X n grid that are enclosed in a circle of diameter n (having the same center as the grid). 3
0, 0, 1, 4, 9, 16, 21, 32, 45, 60, 69, 88, 101, 120, 145, 164, 185, 216, 241, 276, 293, 332, 365, 392, 437, 476, 509, 556, 593, 648, 681, 732, 785, 832, 885, 936, 989, 1052, 1109, 1176, 1225, 1288, 1353, 1428, 1489, 1560, 1625, 1696, 1781, 1860, 1933, 2016, 2085, 2180, 2241, 2340, 2425, 2512, 2609, 2700, 2793, 2876, 2973, 3080, 3173 (list; graph; refs; listen; history; text; internal format)
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

Cf. A085690, A242118.

Sequence in context: A313342 A140868 A313343 * A246336 A232656 A010460

Adjacent sequences:  A261846 A261847 A261848 * A261850 A261851 A261852

KEYWORD

nonn,easy

AUTHOR

V.J. Pohjola, Sep 03 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 25 19:30 EDT 2020. Contains 334595 sequences. (Running on oeis4.)