login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A171817
Primes p such that neither the previous nor the next prime is of the form 6k+1.
1
2, 3, 7, 13, 19, 43, 53, 97, 103, 109, 127, 139, 173, 181, 193, 229, 241, 257, 263, 283, 307, 313, 349, 397, 409, 421, 457, 463, 487, 499, 509, 563, 593, 643, 653, 691, 709, 769, 787, 811, 823, 829, 853, 859, 877, 883, 907, 919, 937, 947, 967, 977, 1021, 1051
OFFSET
1,1
EXAMPLE
2 is a term because 3 is not a prime of the form 6k+1,
3 is a term because 2 and 5 are not primes of the form 6k+1.
7 is a term because 5 and 11 are not primes of the form 6k+1.
PROG
(PARI) lista(nn) = forprime(p=2, nn, if (((precprime(p-1) % 6) != 1) && ((nextprime(p+1) % 6) != 1), print1(p, ", "))); \\ Michel Marcus, Mar 12 2022
CROSSREFS
Sequence in context: A038940 A019383 A249749 * A156300 A067834 A070754
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Dec 19 2009, Feb 11 2010
EXTENSIONS
Entries checked by R. J. Mathar, Apr 14 2010
STATUS
approved