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.

A323138 Multiples of 6 that are not the sum of two consecutive primes.

Original entry on oeis.org

6, 48, 54, 66, 72, 96, 102, 108, 114, 126, 132, 150, 156, 168, 174, 180, 192, 228, 234, 246, 252, 264, 270, 282, 294, 306, 312, 318, 324, 336, 342, 348, 354, 366, 378, 402, 408, 414, 420, 426, 432, 438, 444, 468, 474, 486, 498, 504, 510, 516, 522, 528, 534, 546, 552, 570, 582
Offset: 1

Views

Author

Pedro Caceres, Jan 05 2019

Keywords

Comments

All primes, except 2 and 3, are of the form 6k+1 or 6k-1 for k a positive integer. The converse statement is not true for all k, so the sum of two consecutive primes is not always a multiple of 6. This sequence lists the multiples of 6 that cannot be expressed as a sum of two consecutive primes.

Examples

			6 belongs to the sequence because there are no two consecutive primes adding up to 6. 12 is not in the sequence because 12 = 5 + 7.
		

Crossrefs

Cf. A001043. Subsequence of A008588.

Programs

  • Mathematica
    Complement[6 Range[Last[#]/6], #] &@ Select[Total /@ Partition[Prime@ Range@ 63, 2, 1], Mod[#, 6] == 0 &] (* Michael De Vlieger, Jan 07 2019 *)
  • PARI
    isok(n) = !(n % 6) && (precprime((n-1)/2) + nextprime(n/2) != n); \\ Michel Marcus, Jan 05 2019