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 A259677 #18 Sep 08 2022 08:46:13 %S A259677 21,65,133,341,481,1541,4033,5461,6533,8321,11041,13333,14981,31621, %T A259677 38081,48133,56033,79381,83333,97921,109061,111361,133141,188501, %U A259677 197633,206981,219781,229633,256961,282133,293281,328021,340033,360533,416641,481601,556421 %N A259677 Octagonal numbers (A000567) that are semiprimes (A001358). %H A259677 Colin Barker, <a href="/A259677/b259677.txt">Table of n, a(n) for n = 1..1000</a> %F A259677 Equals A000567 intersect A001358. %e A259677 The octagonal number 21 is in the sequence because 21 = 3 * 7. %t A259677 a={}; Do[If[PrimeOmega[n (3 n - 2)]==2, AppendTo[a, n(3 n - 2)]], {n, 1, 200}]; a (* _Vincenzo Librandi_, Jul 04 2015 *) %t A259677 Select[PolygonalNumber[8,Range[500]],PrimeOmega[#]==2&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 15 2019 *) %o A259677 (PARI) %o A259677 pg(m, n) = (n^2*(m-2)-n*(m-4))/2 \\ n-th m-gonal number %o A259677 select(n->bigomega(n)==2, vector(2000, n, pg(8, n))) %o A259677 (Magma) IsSemiprime:=func<n | &+[d[2]: d in Factorization(n)] eq 2>; [s: n in [2..500] | IsSemiprime(s) where s is n*(3*n-2) ]; // _Vincenzo Librandi_, Jul 04 2015 %Y A259677 Cf. A129521, A245365, A259676. %K A259677 nonn %O A259677 1,1 %A A259677 _Colin Barker_, Jul 03 2015