%I #43 Sep 08 2022 08:46:07
%S 0,0,1,12,48,130,285,546,952,1548,2385,3520,5016,6942,9373,12390,
%T 16080,20536,25857,32148,39520,48090,57981,69322,82248,96900,113425,
%U 131976,152712,175798,201405,229710,260896,295152,332673,373660,418320,466866,519517
%N van Heijst's upper bound on the number of squares inscribed by a real algebraic curve in R^2 of degree n, if the number is finite.
%C In 1911 Toeplitz conjectured the Square Peg (or Inscribed Square) Problem: Every continuous simple closed curve in the plane contains 4 points that are the vertices of a square. The conjecture is still open. Many special cases have been proved; see Matschke's beautiful 2014 survey.
%C Recently van Heijst proved that any real algebraic curve in R^2 of degree d inscribes either at most (d^4 - 5d^2 + 4d)/4 or infinitely many squares. He conjectured that a generic complex algebraic plane curve inscribes exactly (d^4 - 5d^2 + 4d)/4 squares.
%D Otto Toeplitz, Über einige Aufgaben der Analysis situs, Verhandlungen der Schweizerischen Naturforschenden Gesellschaft in Solothurn, 4 (1911), 197.
%H G. C. Greubel, <a href="/A239352/b239352.txt">Table of n, a(n) for n = 0..2500</a>
%H Wouter van Heijst, <a href="http://arxiv.org/abs/1403.5979">The algebraic square peg problem</a>, arXiv:1403.5979 [math.AG], 2014.
%H Wouter van Heijst, <a href="http://urn.fi/URN:NBN:fi:aalto-201404101659">The algebraic square peg problem</a>, Master’s thesis, Aalto University, 2014.
%H Benjamin Matschke, <a href="http://www.ams.org/notices/201404/rnoti-p346.pdf">A Survey on the Square Peg Problem</a>, AMS Notices, 61 (2014), 346-352.
%H Benjamin Matschke, <a href="http://people.mpim-bonn.mpg.de/matschke/SurveyOnSquarePeg_extension14.pdf">Extended Survey on the Square Peg Problem</a>, Max Planck Institute for Mathematics, 2014.
%H <a href="https://oeis.org/search?q=%22Inscribed+Square%22">Sequences related to inscribed squares</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).
%F a(n) = (n^4 - 5*n^2 + 4*n)/4 = n*(n - 1)*(n^2 + n - 4)/4 = A000217(n-1)*A034856(n-1), which shows the formula is an integer.
%F G.f.: x^2 * (1 + 7*x - 2*x^2) / (1 - x)^5. - _Michael Somos_, Mar 21 2014
%F a(n) = A172225(n)/2. - _R. J. Mathar_, Jan 09 2018
%e A point or a line has no inscribed squares, so a(0) = a(1) = 0.
%e A circle has infinitely many inscribed squares, and an ellipse that is not a circle has exactly one, agreeing with a(2) = 1.
%e G.f. = x^2 + 12*x^3 + 48*x^4 + 130*x^5 + 285*x^6 + 546*x^7 + 952*x^8 + ...
%t Table[(n^4 - 5 n^2 + 4 n)/4, {n, 0, 38}]
%o (PARI) for(n=0,50, print1((n^4 - 5*n^2 + 4*n)/4, ", ")) \\ _G. C. Greubel_, Aug 07 2018
%o (Magma) [(n^4 - 5*n^2 + 4*n)/4: n in [0..50]]; // _G. C. Greubel_, Aug 07 2018
%Y Cf. A088544, A089058, A123673, A123697, A209432, A231739.
%K nonn,easy
%O 0,4
%A _Jonathan Sondow_, Mar 21 2014