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 A355272 #13 Jul 03 2022 09:18:15 %S A355272 2,89,97,211,223,359,367,389,397,401,409,449,457,467,479,487,491,499, %T A355272 509,631,673,683,691,701,709,719,727,743,751,761,769,797,887,907,911, %U A355272 919,929,937,983,991,1009,1109,1117,1163,1171,1193,1201,1213,1249,1307,1373 %N A355272 Primes p for which p + q is not a multiple of 4, where q is the previous prime if p == 1 (mod 3) or else the next prime. %C A355272 Naively one might expect p + precprime / nextprime congruent to 0 or to 2 (mod 4) with equal probability. It turns out that, following the given rule, the case 0 is much more frequent than the case 2, especially for small primes. (Observation by Y. Kohmoto.) %C A355272 See the comment from 2017 in A068228 for an explanation. %o A355272 (PARI) select( is(p)=if(p%3==1, precprime(p-1)+p, nextprime(p+1)+p)%4, primes(199)) %o A355272 (Python) %o A355272 from sympy import nextprime %o A355272 from itertools import islice %o A355272 def agen(): %o A355272 p, q = 2, [3, 1] %o A355272 while True: %o A355272 if (p + q[int(p%3 == 1)])%4 != 0: yield p %o A355272 p, q = q[0], [nextprime(q[0]), p] %o A355272 print(list(islice(agen(), 51))) # _Michael S. Branicky_, Jun 26 2022 %Y A355272 Cf. A151799 (previous prime), A151800 (next prime). %Y A355272 Cf. A068228. %K A355272 nonn %O A355272 1,1 %A A355272 _M. F. Hasler_ and _Yasutoshi Kohmoto_, Jun 26 2022