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 A180686 #10 Aug 03 2024 16:48:43 %S A180686 5,6,14,24,44,58,72,76,80,84,86,104,128,134,138,180,186,188,218,228, %T A180686 246,256,266,280,300,320,352,360,380,390,408,450,480,508,518,524,526, %U A180686 532,546,548,552,576,584,590,604,616,630,656,658,686,712,724,726,728,730 %N A180686 Positive integers k such that the number of intersections of diagonals in the interior of a regular k-gon is prime. %D A180686 Chris K. Caldwill & G. L. Honaker, Jr., Prime Curios!, The Dictionary of Prime Number Trivia, CreateSpace, Sept. 2009, p. 145. %H A180686 Robin Visser, <a href="/A180686/b180686.txt">Table of n, a(n) for n = 1..1000</a> %t A180686 del[m_, n_] := If[ Mod[n, m] == 0, 1, 0]; Int[n_] := If[n < 4, 0, Binomial[n, 4] + del[2, n] (-5n^3 + 45n^2 - 70n + 24)/24 - del[4, n] (3n/2) + del[6, n] (-45n^2 + 262n)/6 + del[12, n]*42n + del[18, n]*60n + del[24, n]*35n - del[30, n]*38n - del[42, n]*82n - del[60, n]*330n - del[84, n]*144n - del[90, n]*96n - del[120, n]*144n - del[210, n]*96n]; Select[ Range@ 759, PrimeQ@ Int@# &] %o A180686 (Sage) %o A180686 def is_A180686(k): %o A180686 return Integer(binomial(k,4) + (-5*k^3+45*k^2-70*k+24)*(k%2==0)/24 %o A180686 - 3*k*(k%4==0)/2 + (-45*k^2+262*k)*(k%6==0)/6 + 42*k*(k%12==0) %o A180686 + 60*k*(k%18==0) + 35*k*(k%24==0) - 38*k*(k%30==0) %o A180686 - 82*k*(k%42==0) - 330*k*(k%60==0) - 144*k*(k%84==0) %o A180686 - 96*k*(k%90==0) - 144*k*(k%120==0) - 96*k*(k%210==0)).is_prime() %o A180686 print([k for k in range(1, 1000) if is_A180686(k)]) # _Robin Visser_, Jul 29 2024 %Y A180686 Cf. A006561. %K A180686 nonn %O A180686 1,1 %A A180686 _Robert G. Wilson v_, Sep 16 2010 %E A180686 Name edited by _Robin Visser_, Jul 29 2024