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).

This page as a plain text file.
%I A167915 #17 Nov 10 2023 10:45:20
%S A167915 5,17,19,29,31,41,43,53,67,71,79,89,97,101,103,109,113,127,131,137,
%T A167915 139,149,151,163,173,181,191,197,199,211,223,229,233,239,241,251,257,
%U A167915 269,271,281,283,293,307,311,317,331,337,349,353,367,373,379,389,401,409
%N A167915 Primes which are the sums of two consecutive nonprimes (A141468).
%C A167915 Five together with primes that are the sum of two consecutive composite numbers.
%H A167915 G. C. Greubel, <a href="/A167915/b167915.txt">Table of n, a(n) for n = 1..10000</a>
%F A167915 a(n+1) = A060254(n) = A176902(n+1). - _Juri-Stepan Gerasimov_, Apr 28 2010
%e A167915 a(1)=1+4=5, a(2)=8+9=17.
%t A167915 2*Select[Range[300], !PrimeQ[#] == !PrimeQ[#+1] && PrimeQ[2*#+1] &] + 1 (* _G. C. Greubel_, Jul 01 2016; Nov 10 2023 *)
%o A167915 (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
%o A167915 (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
%Y A167915 Cf. A000040, A060254, A141468, A176902.
%K A167915 nonn
%O A167915 1,1
%A A167915 _Juri-Stepan Gerasimov_, Nov 15 2009
%E A167915 Typo corrected and terms checked by _D. S. McNeil_, Nov 17 2010