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 A321158 #27 Apr 17 2020 04:34:13 %S A321158 11781,61776,75141,133056,152361,156520,176176,179740,188650,210925, %T A321158 241605,266085,292825,298936,338625,342585,354025,358281,360801, %U A321158 365365,371925,391392,395200,400960,417340,419805,424270,438516 %N A321158 Numbers that have exactly 8 representations as a k-gonal number, P(m,k) = m*((k-2)*m - (k-4))/2, k and m >= 3. %H A321158 Hugh Erling, <a href="/A321158/a321158.txt">Python program</a> %e A321158 a(1) 11781 has representations P(m,k) = P(3, 3928)=P(6, 787)=P(9,329)=P(11, 216)=P(21, 58)=P(63, 8)=P(77, 6)=P(153, 3). %e A321158 a(2) 61776 has representations P(m,k) = P(3, 20593)=P(6, 4120)=P(8,2208)=P(11, 1125)=P(26, 192)=P(36, 100)=P(176, 6)=P(351, 3). %e A321158 a(3) 75141 has representations P(m,k) = P(3, 25048)=P(6, 5011)=P(9,2089)=P(11, 1368)=P(18, 493)=P(27, 216)=P(66, 37)=P(69, 34). %t A321158 r[n_] := Module[{k}, Sum[Boole[d >= 3 && (k = 2(d^2 - 2d + n)/(d^2 - d); IntegerQ[k] && k >= 3)], {d, Divisors[2n]}]]; %t A321158 Select[Range[500000], r[#] == 8&] (* _Jean-François Alcover_, Sep 23 2019, after _Andrew Howroyd_ *) %o A321158 (Python) # See link. %o A321158 (PARI) r(n)={sumdiv(2*n, d, if(d>=3, my(k=2*(d^2 - 2*d + n)/(d^2 - d)); !frac(k) && k>=3))} %o A321158 for(n=1, 5*10^5, if(r(n)==8, print1(n, ", "))) \\ _Andrew Howroyd_, Nov 26 2018 %Y A321158 Cf. A275256, A057145, A063778, A129654, A139601, A177029, A195527, A195528, A321156, A321157, A321159, A321160, A320943. %K A321158 nonn %O A321158 1,1 %A A321158 _Hugh Erling_, Oct 29 2018