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-1 of 1 results.

A173752 a(n) = m-k where (prime(k), prime(m)) is the n-th prime pair (x^2-x+11, x^2+x+11), integer x >= 0.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 4, 3, 5, 7, 5, 5, 9, 8, 10, 17, 15, 15, 16, 15, 17, 18, 20, 23, 27, 25, 30, 27, 26, 30, 32, 39, 43, 49, 48, 55, 54, 48, 64, 66, 62, 61, 62, 68, 63, 65, 77, 65, 73, 79, 85, 73, 86, 93, 98, 84, 100, 107, 113, 110, 105, 107, 121, 119, 120, 119, 121, 125, 114
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 23 2010

Keywords

Comments

prime(j) is used here to refer to the j-th prime.

Examples

			The first prime pair (x^2-x+11, x^2+x+11) is obtained for x = 0: 0^2-0+11 = 11 and 0^2+0+11 = 11; 11 is the fifth prime, hence a(1) = 5-5 = 0.
The second prime pair is obtained for x = 1: 1^2-1+11 = 11 and 1^2+1+11 = 13; 11 is the fifth prime and 13 is the sixth prime, hence a(2) = 6-5 = 1.
The third prime pair is obtained for x = 2: 2^2-2+11 = 13 and 2^2+2+11 = 17; 13 is the sixth prime and 17 is the seventh prime, hence a(3) = 7-6 = 1.
The eleventh prime pair is obtained for x = 13: 13^2-13+11 = 167 and 13^2+13+11 = 193; 167 is prime(39) and 193 is prime(44), hence a(11) = 44-39 = 5.
		

Crossrefs

Cf. A048058 (n^2+n+11), A048059 (primes of the form n^2+n+11), A048097 (n such that n^2+n+11 is prime), A175154 (prime index of A048059(n)).

Programs

  • Magma
    PrimePi:=func< n | #PrimesUpTo(n) >; [ PrimePi(p)-PrimePi(q): x in [0..850] | IsPrime(p) and IsPrime(q) where p is x^2+x+11 where q is x^2-x+11 ]; // Klaus Brockhaus, Feb 27 2010
  • Maple
    for x from 0 to 1000 do mp := x^2+x+11 ; kp := x^2-x+11 ; if isprime(mp) and isprime(kp) then m := numtheory[pi](mp) ; k := numtheory[pi](kp) ; printf("%d,",m-k) ; end if; end do : # R. J. Mathar, Mar 01 2010
  • Mathematica
    pp[n_]:=Module[{c=n^2+11},If[AllTrue[c+{n,-n},PrimeQ],PrimePi[c+n]- PrimePi[ c-n],0]]; Join[{0},Array[pp,1000]/.(0->Nothing)] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 15 2017 *)

Extensions

Edited and extended by Klaus Brockhaus, Feb 27 2010
a(15) corrected and sequence extended by R. J. Mathar, Mar 01 2010
Showing 1-1 of 1 results.