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 A335057 #10 May 24 2020 17:48:08 %S A335057 1,2,4,4,9,10,11,16,24,20,34,34,37,46,59,50,74,74,78,90,109,96,129, %T A335057 128,134,150,174,152,199,198,205,224,254,232,284,282,291,314,349,322, %U A335057 384,382,392,418,459,428,499,496,508,538,584,548,629,626,639,672,724 %N A335057 a(n) is the number of regions inside an n-gon formed by the straight line segments connecting vertex k to vertex 2k mod n. %C A335057 The envelope of the lines form a cardioid. %H A335057 Lars Blomberg, <a href="/A335057/b335057.txt">Table of n, a(n) for n = 3..270</a> %H A335057 Lars Blomberg, <a href="/A335057/a335057.png">Illustration for n = 12</a> %H A335057 Lars Blomberg, <a href="/A335057/a335057_1.png">Illustration for n = 18</a> %H A335057 Lars Blomberg, <a href="/A335057/a335057_2.png">Illustration for n = 32</a> %H A335057 Lars Blomberg, <a href="/A335057/a335057_3.png">Illustration for n = 107</a> %F A335057 Empirically for n <= 270. %F A335057 For n > 3 select the row in the table below for which d = n mod m. Then a(n) = (a*n^2+b*n+c)/denom. %F A335057 +=============================================+ %F A335057 | d | m | a | b | c | denom | %F A335057 +---------------------------------------------+ %F A335057 | 1, 5 | 6 | 5 | 0 | -29 | 24 | %F A335057 | 3 | 6 | 5 | -16 | 3 | 24 | %F A335057 | 2, 10 | 12 | 5 | -12 | 4 | 24 | %F A335057 | 4, 8 | 12 | 5 | -12 | 16 | 24 | %F A335057 | 0 | 60 | 5 | -28 | 0 | 24 | %F A335057 | 6, 18, 42, 54 | 60 | 5 | -28 | 84 | 24 | %F A335057 | 12, 24, 36, 48 | 60 | 5 | -28 | 96 | 24 | %F A335057 | 30 | 60 | 5 | -28 | -12 | 24 | %F A335057 +=============================================+ %o A335057 (PARI) bc=[[5,0,-29,24],[5,-16,3,24],[5,-12,4,24],[5,-12,16,24],[5,-28,0,24],[5,-28,84,24],[5,-28,96,24],[5,-28,-12,24]]; %o A335057 m=[[1,6,1],[5,6,1],[3,6,2],[2,12,3],[10,12,3],[4,12,4],[8,12,4],[0,60,5],[6,60,6],[18,60,6],[42,60,6],[54,60,6],[12,60,7],[24,60,7],[36,60,7],[48,60,7],[30,60,8]]; %o A335057 ix(n)=for(i=1,length(m),x=m[i];if(n%x[2]==x[1], return(x[3])));-1 %o A335057 a(n)=if(n==3,return(1));x=bc[ix(n)];(x[1]*n^2+x[2]*n+x[3])/x[4] %o A335057 vector(200,x,a(x+2)) %Y A335057 Cf. A335058 (edges), A335059 (vertices), A335129 (distinct lines). %K A335057 nonn %O A335057 3,2 %A A335057 _Lars Blomberg_, May 23 2020