cp's OEIS Frontend

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.

A292530 Primes prime(k) such that neither prime(k) + prime(k-1) nor prime(k) + prime(k+1) is divisible by 3.

Original entry on oeis.org

3, 53, 157, 173, 211, 257, 263, 373, 509, 541, 563, 593, 607, 653, 733, 947, 977, 997, 1069, 1103, 1123, 1187, 1223, 1237, 1367, 1459, 1499, 1511, 1543, 1747, 1753, 1759, 1777, 1901, 1907, 1913, 2069, 2179, 2287, 2399, 2411, 2417, 2447, 2677, 2903, 2963, 3061, 3067, 3181, 3203, 3307, 3313, 3511
Offset: 1

Views

Author

Marc Morgenegg, Sep 18 2017

Keywords

Comments

Prime(k) is the k-th prime. It seems to be rare that the sum of two consecutive primes is not divisible by 3. For each prime(k) in this sequence (other than prime(2) = 3), the three numbers prime(k-1), prime(k), and prime(k+1) are all of the form 6*x+1 or all of the form 6*x-1.
Apart from the first term a(1) = 3 also middle of 3 consecutive primes whose sum is divisible by 3. - Hugo Pfoertner, Aug 29 2020

Examples

			3 is a term, because 3+2 = 5 and 3+5 = 8; neither 5 nor 8 is divisible by 3.
53 is a term as well, because 53+47 = 100 and 53+59 = 112, and neither 100 nor 112 is divisible by 3.
		

Programs

  • Maple
    Primes:= select(isprime,[2,seq(i,i=3..10000,2)]):
    R:= select(k -> Primes[k]+Primes[k-1] mod 3 <> 0, {$2..nops(Primes)}):
    R:= R intersect map(`-`,R,1);
    Primes[sort(convert(R,list))]; # Robert Israel, Sep 18 2017
  • Mathematica
    Select[Prime@ Range@ 500, NoneTrue[# + {NextPrime[#, -1], NextPrime@ #}, Divisible[#, 3] &] &] (* Michael De Vlieger, Sep 19 2017 *)
  • PARI
    isok(p) = isprime(p) && ((p + precprime(p-1)) % 3) && ((p + nextprime(p+1)) % 3) \\ Michel Marcus, Sep 18 2017

Extensions

More terms from Robert Israel, Sep 18 2017