login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A209619 Primes separated from their previous adjacent primes by a composite number of successive composites. 2

%I #19 Nov 30 2014 18:41:47

%S 149,191,251,293,347,419,431,557,587,641,701,719,797,821,839,929,1031,

%T 1049,1061,1151,1163,1181,1259,1361,1409,1481,1637,1709,1733,1811,

%U 1847,1889,1949,1973,2027,2039,2063,2099,2129,2153,2237,2267,2333,2503,2531,2579

%N Primes separated from their previous adjacent primes by a composite number of successive composites.

%C a(1) = 149 is the first prime separated from its previous prime (139) by a composite number (9) of successive composites, namely, 148, 147, 146, 145, 144, 143, 142, 141, 140.

%C Primes p such that nextprime(p) - p - 1 is composite. - _Jahangeer Kholdi_, Nov 27 2014

%H Harvey P. Dale, <a href="/A209619/b209619.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A151800(A209618(n)).

%p N:= 3000: # to get all entries <= N

%p Primes:= select(isprime,[seq(2*i+1,i=1..(N-1)/2)]):

%p Q:= map(t -> (t>2) and not isprime(t-1), Primes[2..-1] - Primes[1..-2]):

%p zip(proc(p,q) if q then p else NULL fi end proc, Primes[2..-1],Q); # _Robert Israel_, Nov 28 2014

%t ps = Prime[Range[500]]; pos = Position[Differences[ps] - 1, _?(# > 1 && ! PrimeQ[#] &)]; ps[[Flatten[pos + 1]]] (* _T. D. Noe_, Mar 21 2012 *)

%t Transpose[Select[Partition[Prime[Range[400]], 2, 1], CompositeQ[#[[2]] - #[[1]] - 1] &]][[2]] (* _Harvey P. Dale_, Aug 05 2014 *)

%t Select[Prime[Range[375]], NextPrime[#] - # - 1 > 1 && !PrimeQ[NextPrime[#] - # - 1] &] (* _Jahangeer Kholdi_, Nov 27 2014 *)

%K nonn

%O 1,1

%A _Lekraj Beedassy_, Mar 21 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 01:19 EDT 2024. Contains 371906 sequences. (Running on oeis4.)