This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A105638 #37 Jan 18 2025 07:43:07 %S A105638 0,1,5,7,14,17,27,31,44,49,65,71,90,97,119,127,152,161,189,199,230, %T A105638 241,275,287,324,337,377,391,434,449,495,511,560,577,629,647,702,721, %U A105638 779,799,860,881,945,967,1034,1057,1127,1151,1224,1249,1325,1351,1430,1457 %N A105638 Maximum number of intersections in self-intersecting n-gon. %C A105638 Quasipolynomial of order 2. - _Charles R Greathouse IV_, Mar 29 2012 %D A105638 B. Grünbaum, Selfintersections of Polygons, Geombinatorics, Volume VIII 4 (1998), pp. 37-45. %H A105638 David W. Wilson, <a href="/A105638/b105638.txt">Table of n, a(n) for n = 3..10000</a> %H A105638 F. Javier de Vega, <a href="https://arxiv.org/abs/2003.13378">An extension of Furstenberg's theorem of the infinitude of primes</a>, arXiv:2003.13378 [math.NT], 2020. %H A105638 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1). %F A105638 a(n) = n(n-3)/2 if n odd, n(n-4)/2+1 if n even. %F A105638 a(n) = a(n-1) + 2a(n-2) - 2a(n-3) - a(n-4) + a(n-5). %F A105638 G.f.: x^4*(1+4*x-x^3)/((1+x)^2*(1-x)^3). - _Colin Barker_, Jan 31 2012 %e A105638 The self-intersecting pentagon with the largest number of intersections is the star polygon {5/2} (pentagram), with 5 intersections, hence a(5) = 5. %t A105638 LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 5, 7, 14}, 54] (* or *) %t A105638 DeleteCases[CoefficientList[Series[x^4*(1 + 4 x - x^3)/((1 + x)^2*(1 - x)^3), {x, 0, 56}], x], 0] (* _Michael De Vlieger_, Jul 10 2020 *) %o A105638 (PARI) a(n)=if(n%2,n*(n-3)/2,n*(n-4)/2+1) \\ _Charles R Greathouse IV_, Mar 29 2012 %K A105638 nonn,easy %O A105638 3,3 %A A105638 _David W. Wilson_, Apr 16 2005