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 A353056 #30 May 27 2023 11:38:39 %S A353056 21,91,273,343,507,651,1333,4557,6321,6643,27391,36673,50851,65793, %T A353056 83811,105301,139503,190533,194923,217623,234741,391251,545383, %U A353056 1647373,1961401,2032051,2376223,4517751,6118203,6484663,11590621,13180531,14535157,20155611,28371603,35646871 %N A353056 Composite numbers of the form k^2+k+1 all of whose prime factors are of that same form. %H A353056 David A. Corneth, <a href="/A353056/b353056.txt">Table of n, a(n) for n = 1..318</a> %H A353056 Cody S. Hansen and Pace P. Nielsen, <a href="https://arxiv.org/abs/2204.08971">Prime factors of phi3(x) of the same form</a>, arXiv:2204.08971 [math.NT], 2022. %e A353056 21 = 4^2+4+1 and its factors are 3 and 7, terms of A002383. So 21 is a term. %p A353056 q:= n-> not isprime(n) and andmap(p-> issqr(4*p-3), numtheory[factorset](n)): %p A353056 select(q, [k*(k+1)+1$k=4..6000])[]; # _Alois P. Heinz_, Apr 20 2022 %t A353056 Select[Table[n^2 + n + 1, {n, 1, 6000}], CompositeQ[#] && AllTrue[FactorInteger[#][[;; , 1]], IntegerQ@Sqrt[4*#1 - 3] &] &] (* _Amiram Eldar_, Apr 20 2022 *) %o A353056 (PARI) lista(nn) = {for (n=1, nn, my(x=n^2+n+1); if (! isprime(x), my(fa=factor(x), ok=1); for (k=1, #fa~, my(fk=fa[k,1]); if (! issquare(4*fk-3), ok = 0);); if (ok, print1(x, ", "));););} %o A353056 (Python) %o A353056 from sympy import isprime, factorint %o A353056 from itertools import count, takewhile %o A353056 def agento(N): # generator of terms up to limit N %o A353056 form = set(takewhile(lambda x: x<=N, (k**2 + k + 1 for k in count(1)))) %o A353056 for t in sorted(form): %o A353056 if not isprime(t) and all(p in form for p in factorint(t)): %o A353056 yield t %o A353056 print(list(agento(10**8))) # _Michael S. Branicky_, Apr 20 2022 %Y A353056 Subsequence of A174969. %Y A353056 Cf. A002383. %K A353056 nonn %O A353056 1,1 %A A353056 _Michel Marcus_, Apr 20 2022