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.

A021007 Let q_k = p*(p+2) be product of k-th pair of twin primes; sequence gives values of p+2 such that (q_k)^2 > q_{k-i}*q_{k+i} for all 1 <= i <= k-1.

Original entry on oeis.org

5, 13, 31, 61, 103, 139, 181, 193, 229, 421, 523, 571, 601, 811, 823, 1021, 1231, 1279, 1291, 1609, 1669, 1873, 2083, 2551, 2659, 2689, 2971, 3121, 3253, 3331, 3361, 3769, 3823, 3919, 4003, 5233, 5419, 5479, 6091, 6271, 6553, 6661, 6691, 8221, 8821, 8971
Offset: 1

Views

Author

Keywords

Comments

Even if there are infinitely many twin primes, it is not clear that this sequence is infinite. The Hardy-Littlewood conjecture implies that there are infinitely many twin primes where p+2 is not in the sequence. - Robert Israel, Apr 02 2014

Examples

			(11*13)^2 > (5*7)*(17*19): (11*13)^2 > (3*5)*(29*31).
		

Crossrefs

Programs

  • Maple
    N:= 20000:
    Primes:= [seq(ithprime(i),i=1..N)]:
    Twink:= select(t-> (Primes[t+1]=Primes[t]+2),[$1..N-1]):
    Qk:= [seq(Primes[i]*Primes[i+1],i=Twink)]:
    filter:= proc(k)
       local T,i;
       T:= Qk[k]^2;
       for i from 1 to k-1 do
         if Qk[k-i]*Qk[k+i]>=T then return false fi
       od;
       true
    end;
    R:= select(filter,[$1 .. floor(nops(Twink)/2)]):
    A021007:= map(k -> Primes[Twink[k]+1],R); # Robert Israel, Apr 02 2014
  • PARI
    twins=List(); p=3;forprime(q=5,1e5,if(q-p==2,listput(twins,q)); p=q); for(k=1,(#twins+1)\2, for(i=1,k-1,if(twins[k]^2 < twins[k-i]*twins[k+i],next(2))); print1(twins[k]", ")) \\ Charles R Greathouse IV, Apr 02 2014

Extensions

a(1) inserted by Robert Israel, Apr 02 2014