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.

A167915 Primes which are the sums of two consecutive nonprimes (A141468).

Original entry on oeis.org

5, 17, 19, 29, 31, 41, 43, 53, 67, 71, 79, 89, 97, 101, 103, 109, 113, 127, 131, 137, 139, 149, 151, 163, 173, 181, 191, 197, 199, 211, 223, 229, 233, 239, 241, 251, 257, 269, 271, 281, 283, 293, 307, 311, 317, 331, 337, 349, 353, 367, 373, 379, 389, 401, 409
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 15 2009

Keywords

Comments

Five together with primes that are the sum of two consecutive composite numbers.

Examples

			a(1)=1+4=5, a(2)=8+9=17.
		

Crossrefs

Programs

  • Magma
    [2*n+1: n in [1..300] | (not IsPrime(n) eq not IsPrime(n+1)) and IsPrime(2*n+1)]; // G. C. Greubel, Nov 10 2023
    
  • Mathematica
    2*Select[Range[300], !PrimeQ[#] == !PrimeQ[#+1] && PrimeQ[2*#+1] &] + 1 (* G. C. Greubel, Jul 01 2016; Nov 10 2023 *)
  • SageMath
    [2*n+1 for n in (1..300) if  (not is_prime(n)) - (not is_prime(n+1)) == 0 and is_prime(2*n+1)] # G. C. Greubel, Nov 10 2023

Formula

a(n+1) = A060254(n) = A176902(n+1). - Juri-Stepan Gerasimov, Apr 28 2010

Extensions

Typo corrected and terms checked by D. S. McNeil, Nov 17 2010