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.

A302564 a(n) is the greatest prime p such that (2*n+1-p)/2 is prime.

Original entry on oeis.org

3, 5, 7, 7, 11, 13, 13, 17, 19, 19, 23, 23, 17, 29, 31, 31, 29, 37, 37, 41, 43, 43, 47, 47, 41, 53, 53, 47, 59, 61, 61, 59, 67, 67, 71, 73, 73, 71, 79, 79, 83, 83, 53, 89, 89, 83, 89, 97, 97, 101, 103, 103, 107, 109, 109, 113, 113, 107, 113, 103, 113, 107, 127, 127, 131, 131, 113, 137, 139, 139
Offset: 3

Views

Author

Robert Israel, Aug 15 2018

Keywords

Comments

Lemoine's conjecture, also called Levy's conjecture, says a(n) exists for all n >= 3.

Crossrefs

Programs

  • Maple
    Lemoine:= proc(x) local s;
    s:= x;
    while s > 3 do
      s:= prevprime(s);
      if isprime((x-s)/2) then return s fi
    od;
    end proc:
    seq(Lemoine(2*n+1),n=3..100);
  • PARI
    a(n) = {my(p = precprime(2*n+1)); while (!isprime((2*n+1-p)/2), p = precprime(p-1)); p;} \\ Michel Marcus, Aug 16 2018