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.

A078587 Largest prime p such that p and 2n-p is also prime.

This page as a plain text file.
%I A078587 #19 Jan 01 2024 02:02:54
%S A078587 3,3,5,3,5,7,7,5,11,7,11,13,13,11,17,7,17,19,13,17,19,19,23,23,19,17,
%T A078587 29,19,23,29,31,29,31,31,29,37,37,29,41,19,41,43,31,41,43,37,47,43,43,
%U A078587 47,47,43,53,53,43,47,59,43,53,59,61,59,61,61,53,67,67,59,71,67,59,71
%N A078587 Largest prime p such that p<n and 2n-p is also prime.
%C A078587 Suggested by Goldbach Conjecture.
%C A078587 Also, values of p from A143697. This follows from the factorization n^2-k^2 = (n-k)(n+k). - _T. D. Noe_, Jan 22 2009
%H A078587 P. CAMI, <a href="/A078587/b078587.txt">Table of n, a(n) for n = 4..60000</a>
%F A078587 a(n) = 2n - A078496(n)
%t A078587 Table[p=n+1; q=2n-p; While[q>0&&!(PrimeQ[p]&&PrimeQ[q]), p++; q-- ]; q, {n, 4, 100}]
%o A078587 (PARI) a(n) = {my(p = precprime(n-1)); while(!isprime(2*n-p), p = precprime(p-1)); p;} \\ _Michel Marcus_, Oct 22 2016
%Y A078587 Cf. A143697, A078496.
%Y A078587 Cf. A082467.
%K A078587 easy,nonn
%O A078587 4,1
%A A078587 _T. D. Noe_, Dec 02 2002
%E A078587 Edited by _N. J. A. Sloane_, Jan 24 2009 at the suggestion of _R. J. Mathar_ and _T. D. Noe_.