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.

A049591 Odd primes p such that p+2 is composite.

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, 139, 151, 157, 163, 167, 173, 181, 193, 199, 211, 223, 229, 233, 241, 251, 257, 263, 271, 277, 283, 293, 307, 313, 317, 331, 337, 349, 353, 359, 367, 373, 379, 383, 389
Offset: 1

Views

Author

Keywords

Comments

Primes p such that nextprime(p)-p >= 4.
Primes p such that p+2 divides (p-1)!.
Odd primes n such that n!*B(n+1) is an integer, where B(k) are the Bernoulli numbers. - Benoit Cloitre, Feb 06 2002
Sequence appears also to give all n > 1 such that there is no prime p satisfying the inequality n < p < n+tau(n)^2 where tau(n)=A000005(n). - Benoit Cloitre, Apr 13 2002
Conjecture: start from any initial value f(1) >= 2 and define f(n) to be the largest prime factor of f(1) +f(2) + ... +f(n-1); then f(n) = n/2 + O(log(n)) and there are infinitely many primes p such that f(2p)=p. Conjecture: current sequence gives primes satisfying f(2p)=p when f(1)=3. - Benoit Cloitre, Jun 04 2003
Numbers k such that 2((k-1)! + 1) + k is divisible by k(k+2). For 7 and 13, the respective quotients are also in the sequence. Are there any other such k? - Ivan N. Ianakiev, Aug 03 2019. The next values of k with respective quotients in this sequence are 103, 1531, 1637. - Amiram Eldar, Jun 08 2020
Numbers k such that 4((k-1)! + 1) == k^2 (mod k(k+2)). - Thomas Ordowski, May 09 2020

Examples

			13 is here because it is prime and 15 is composite. Also 15 divides 12!.
		

Crossrefs

Programs

  • Magma
    [k:k in PrimesInInterval(3,400)| not IsPrime(k+2)]; // Marius A. Burtea, Aug 03 2019
    
  • Maple
    d:=4; M:=1000; t0:=[]; for n from 1 to M do p:=ithprime(n); if nextprime(p) - p >= d then t0:=[op(t0),p]; fi; od: t0;
  • Mathematica
    Select[Prime[Range[100]], NextPrime[#] -#>=4 &] (* G. C. Greubel, Aug 22 2019 *)
  • PARI
    isok(p) = isprime(p) && (p % 2) && !isprime(p+2); \\ Michel Marcus, Feb 25 2014
    
  • Sage
    [nth_prime(n) for n in (1..100) if (nth_prime(n+1) - nth_prime(n)) >= 4] # G. C. Greubel, Aug 22 2019

Extensions

More terms from Benoit Cloitre, Jun 04 2003
Edited by Don Reble, Dec 20 2006