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.

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.

This page as a plain text file.
%I A173752 #11 Sep 08 2022 08:45:50
%S A173752 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,
%T A173752 30,27,26,30,32,39,43,49,48,55,54,48,64,66,62,61,62,68,63,65,77,65,73,
%U A173752 79,85,73,86,93,98,84,100,107,113,110,105,107,121,119,120,119,121,125,114
%N 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.
%C A173752 prime(j) is used here to refer to the j-th prime.
%H A173752 Harvey P. Dale, <a href="/A173752/b173752.txt">Table of n, a(n) for n = 1..1000</a>
%e A173752 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.
%e A173752 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.
%e A173752 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.
%e A173752 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.
%p A173752 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
%t A173752 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 *)
%o A173752 (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
%Y A173752 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)).
%K A173752 nonn
%O A173752 1,4
%A A173752 _Juri-Stepan Gerasimov_, Feb 23 2010
%E A173752 Edited and extended by _Klaus Brockhaus_, Feb 27 2010
%E A173752 a(15) corrected and sequence extended by _R. J. Mathar_, Mar 01 2010