login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 0
2, 89, 97, 211, 223, 359, 367, 389, 397, 401, 409, 449, 457, 467, 479, 487, 491, 499, 509, 631, 673, 683, 691, 701, 709, 719, 727, 743, 751, 761, 769, 797, 887, 907, 911, 919, 929, 937, 983, 991, 1009, 1109, 1117, 1163, 1171, 1193, 1201, 1213, 1249, 1307, 1373 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
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.)
See the comment from 2017 in A068228 for an explanation.
LINKS
PROG
(PARI) select( is(p)=if(p%3==1, precprime(p-1)+p, nextprime(p+1)+p)%4, primes(199))
(Python)
from sympy import nextprime
from itertools import islice
def agen():
p, q = 2, [3, 1]
while True:
if (p + q[int(p%3 == 1)])%4 != 0: yield p
p, q = q[0], [nextprime(q[0]), p]
print(list(islice(agen(), 51))) # Michael S. Branicky, Jun 26 2022
CROSSREFS
Cf. A151799 (previous prime), A151800 (next prime).
Cf. A068228.
Sequence in context: A012728 A012733 A058459 * A105268 A139881 A161676
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 01:01 EDT 2024. Contains 371696 sequences. (Running on oeis4.)