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.

This page as a plain text file.
%I A021007 #18 Apr 02 2014 11:55:49
%S A021007 5,13,31,61,103,139,181,193,229,421,523,571,601,811,823,1021,1231,
%T A021007 1279,1291,1609,1669,1873,2083,2551,2659,2689,2971,3121,3253,3331,
%U A021007 3361,3769,3823,3919,4003,5233,5419,5479,6091,6271,6553,6661,6691,8221,8821,8971
%N 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.
%C A021007 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
%H A021007 Charles R Greathouse IV, <a href="/A021007/b021007.txt">Table of n, a(n) for n = 1..10000</a>
%e A021007 (11*13)^2 > (5*7)*(17*19): (11*13)^2 > (3*5)*(29*31).
%p A021007 N:= 20000:
%p A021007 Primes:= [seq(ithprime(i),i=1..N)]:
%p A021007 Twink:= select(t-> (Primes[t+1]=Primes[t]+2),[$1..N-1]):
%p A021007 Qk:= [seq(Primes[i]*Primes[i+1],i=Twink)]:
%p A021007 filter:= proc(k)
%p A021007    local T,i;
%p A021007    T:= Qk[k]^2;
%p A021007    for i from 1 to k-1 do
%p A021007      if Qk[k-i]*Qk[k+i]>=T then return false fi
%p A021007    od;
%p A021007    true
%p A021007 end;
%p A021007 R:= select(filter,[$1 .. floor(nops(Twink)/2)]):
%p A021007 A021007:= map(k -> Primes[Twink[k]+1],R); # _Robert Israel_, Apr 02 2014
%o A021007 (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
%Y A021007 Cf. A028388, A021005.
%K A021007 nonn
%O A021007 1,1
%A A021007 _Naohiro Nomoto_
%E A021007 a(1) inserted by _Robert Israel_, Apr 02 2014