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 A128127 #21 Aug 20 2017 09:11:13 %S A128127 1,3,9,21,37,59 %N A128127 The number of regular pentagons found by constructing n equally-spaced points on each side of the pentagon and drawing lines parallel to the pentagon side. %C A128127 A similar pattern of construction to A000330 (dividing a square), A002717 (dividing a triangle), dividing a hexagon and any other polygon in a similar fashion (sequences pending). %C A128127 Use 1 midpoint (resp. 2 points) on each side placed to divide each side into 2 (resp. 3) equally-sized segments or so on, do the same construction for every side of the pentagon so that each side is equally divided in the same way. Connect all such points to each other with lines that are parallel to at least 1 side of the polygon. %H A128127 Michel Marcus, <a href="/A128127/a128127.png">Figure with 2 points on each side</a> %H A128127 Noah Priluck, <a href="http://www.uccs.edu/geombina/2007.html#issue4">On Counting Regular Polygons Formed by Special Families of Parallel Lines</a>, Geombinatorics Quarterly, Vol XVII (4), 2008, pp. 166-171. (note there is no document to download). %H A128127 Noah Priluck, <a href="/A128127/a128127.pdf">On Counting Regular Polygons Formed by Special Families of Parallel Lines</a> %F A128127 a(n) = (10*n^2 - 4*n + 5 -(-1)^n)/4 (conjectural). %e A128127 With 0 point, there is only 1 pentagon, the original one. With 1 point (a midpoint on each side), 3 regular pentagons are found. With two points, 9 regular pentagons are found in total. %o A128127 (PARI) %o A128127 ldraw(w, vx, vy, np, with, ia, ib, jb, ja) = {if (with, kdeb = 0; kend = np, kdeb = 1; kend = np-1;); for (k=kdeb, kend, plotmove(w, vx[ia]+k*(vx[ib]-vx[ia])/np, vy[ia]+k*(vy[ib]-vy[ia])/np); plotlines(w, vx[ja]+k*(vx[jb]-vx[ja])/np, vy[ja]+k*(vy[jb]-vy[ja])/np););} %o A128127 modnv(i, nv) = {i = i % nv; if (i == 0, i = nv); return (i);} %o A128127 poly(nv, np, with) = {w = 2; s = plothsizes(); plotinit(w, s[1]-1, s[2]-1); plotscale(w, 0, 1000, 0, 1000); xc = 500; yc = 500; vx = vector(nv, i, xc + 500*sin(i*2*Pi/nv)); vy = vector(nv, i, yc + 500*cos(i*2*Pi/nv)); plotlines(w ,vx, vy, 1); plotmove(w, vx[nv], vy[nv]); plotlines(w, vx[1], vy[1]); np++; for (ia=1, nv, ia = modnv(ia, nv); ib = modnv(ia+1, nv); for (ja=1, nv, ja = modnv(ja, nv); if (ja != ia, jb = modnv(ja+1, nv); ldraw(w, vx, vy, np, with, ia, ib, ja, jb);););); plotdraw([w, 0, 0]); return(0);} \\ use poly(5, n, 0) to get figure with n points \\ _Michel Marcus_, Jul 09 2013 %Y A128127 Cf. A128153 (same construction but with pentagon vertices also connected). %K A128127 more,nonn %O A128127 0,2 %A A128127 Noah Priluck (npriluck(AT)gmail.com), May 02 2007 %E A128127 Edited by _Michel Marcus_, Jul 09 2013 %E A128127 a(4) and a(5) from _Michel Marcus_, Jul 21 2013