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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

149, 191, 251, 293, 347, 419, 431, 557, 587, 641, 701, 719, 797, 821, 839, 929, 1031, 1049, 1061, 1151, 1163, 1181, 1259, 1361, 1409, 1481, 1637, 1709, 1733, 1811, 1847, 1889, 1949, 1973, 2027, 2039, 2063, 2099, 2129, 2153, 2237, 2267, 2333, 2503, 2531, 2579
Offset: 1

Views

Author

Lekraj Beedassy, Mar 21 2012

Keywords

Comments

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.
Primes p such that nextprime(p) - p - 1 is composite. - Jahangeer Kholdi, Nov 27 2014

Programs

  • Maple
    N:= 3000: # to get all entries <= N
    Primes:= select(isprime,[seq(2*i+1,i=1..(N-1)/2)]):
    Q:= map(t -> (t>2) and not isprime(t-1), Primes[2..-1] - Primes[1..-2]):
    zip(proc(p,q) if q then p else NULL fi end proc, Primes[2..-1],Q); # Robert Israel, Nov 28 2014
  • Mathematica
    ps = Prime[Range[500]]; pos = Position[Differences[ps] - 1, ?(# > 1 && ! PrimeQ[#] &)]; ps[[Flatten[pos + 1]]] (* _T. D. Noe, Mar 21 2012 *)
    Transpose[Select[Partition[Prime[Range[400]], 2, 1], CompositeQ[#[[2]] - #[[1]] - 1] &]][[2]] (* Harvey P. Dale, Aug 05 2014 *)
    Select[Prime[Range[375]], NextPrime[#] - # - 1 > 1 && !PrimeQ[NextPrime[#] - # - 1] &] (* Jahangeer Kholdi, Nov 27 2014 *)

Formula

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

A209623 Primes separated from their adjacent next primes by a prime number of successive composites.

Original entry on oeis.org

7, 13, 19, 23, 31, 37, 43, 47, 53, 61, 67, 73, 79, 83, 89, 97, 103, 109, 113, 127, 131, 151, 157, 163, 167, 173, 193, 199, 211, 223, 229, 233, 251, 257, 263, 271, 277, 293, 307, 313, 317, 331, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 433, 439, 443
Offset: 1

Views

Author

Lekraj Beedassy, Mar 10 2012

Keywords

Comments

a(1) = 7 is the first prime separated from the next prime (11) by a prime number (3) of successive composites, namely, 8, 9, 10.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[100]], PrimeQ[NextPrime[#] - # - 1] &] (* T. D. Noe, Mar 12 2012 *)
Showing 1-2 of 2 results.