login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A219023 Number of primes p<n such that n^2-n+p and n^2+n-p are both prime. 5
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 0, 1, 1, 0, 0, 2, 1, 0, 2, 0, 0, 0, 2, 1, 1, 0, 2, 1, 0, 2, 3, 0, 2, 2, 0, 1, 4, 1, 2, 1, 0, 0, 3, 1, 1, 3, 0, 0, 1, 2, 1, 1, 1, 1, 0, 0, 2, 3, 1, 0, 3, 1, 2, 1, 0, 1, 4, 0, 1, 2, 0, 2, 3, 0, 0, 4, 0, 2, 2, 0, 1, 3, 2, 1, 4, 1, 1, 3, 3, 2, 3, 1, 2, 1, 0, 2, 4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,12

COMMENTS

Conjecture: a(n)>0 for all n>2732.

We have verified this conjecture for n up to 1.4*10^7. Note that the conjecture is stronger than Oppermann's conjecture which states that for any integer n>1 both of the two intervals (n^2-n,n^2) and (n^2,n^2+n) contain primes.

Zhi-Wei Sun also made the following conjectures: For n>3512 there is a prime p in (n,2n) such that both n^2-n+p and n^2+n-p are prime. For n>1828 there is a prime p<n such that both n^2-n-p and n^2+n+p are prime. For n>4517 there is a prime in (n,2n) such that both n^2-n-p and n^2+n+p are prime.

LINKS

Zhi-Wei Sun, Table of n, a(n) for n = 1..20000

Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv preprint arXiv:1211.1588, 2012.

Wikipedia, Oppermann's Conjecture

EXAMPLE

a(12)=2 since the 5 and 7 are the only primes p<12 with 12^2-12+p and 12^2+12-p both prime.

MATHEMATICA

a[n_]:=a[n]=Sum[If[PrimeQ[n^2-n+Prime[k]]==True&&PrimeQ[n^2+n-Prime[k]]==True, 1, 0], {k, 1, PrimePi[n-1]}]

Do[Print[n, " ", a[n]], {n, 1, 20000}]

Table[Total[Table[If[AllTrue[{k^2-k+p, k^2+k-p}, PrimeQ], 1, 0], {p, Prime[ Range[ PrimePi[k]]]}]], {k, 100}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 23 2017 *)

PROG

(PARI) A219023(n)={my(c=0, nm=n^2-n, np=n^2+n); forprime(p=1, n-1, isprime(np-p) && isprime(nm+p) && c++); c} \\ - M. F. Hasler, Nov 11 2012

CROSSREFS

Cf. A000040.

Sequence in context: A281116 A089233 A066620 * A025427 A245963 A291375

Adjacent sequences:  A219020 A219021 A219022 * A219024 A219025 A219026

KEYWORD

nonn

AUTHOR

Zhi-Wei Sun, Nov 10 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 12:38 EDT 2019. Contains 324152 sequences. (Running on oeis4.)