%I #15 Sep 02 2019 02:33:43
%S 3,2,3,3,3,3,2,3,3,2,2,3,7,2,3,2,2,3,3,2,3,3,3,3,2,2,2,7,3,2,7,2,3,3,
%T 3,3,3,3,2,2,3,3,2,2,2,2,3,3,3,2,3,3,3,3,3,2,3,3,3,13,2,2,7,3,3,2,3,3,
%U 3,3,3,3,3,3,3,3,2,3,2,3,3,3,2,3,2,2,3,3,7,3,3,7,2,2,7,3,3,7,2,3,3,2,3,3,7
%N Primes of the form (prime(n+2)-prime(n))/(prime(n+1)-prime(n)), where prime(n)=n-th prime.
%C For any prime q, successive prime gaps of 6 and 6*(q-1) will produce an entry of q in this sequence. We therefore expect each prime to occur infinitely often. The first appearances of the first 9 primes are at positions 2, 1, 185, 13, 2091, 60, 20352, 520, and 34248. - _Robert Israel_, Sep 01 2019
%H Robert Israel, <a href="/A142246/b142246.txt">Table of n, a(n) for n = 1..10000</a>
%e If n=1, then (p(1+2)-p(1))/(p(1+1)-p(1))=(5-2)/(3-2)=3=a(1).
%e If n=2, then (p(2+2)-p(2))/(p(2+1)-p(2))=(7-3)/(5-3)=2=a(2).
%e If n=3, then (p(3+2)-p(3))/(p(3+1)-p(3))=(11-5)/(7-5)=3= a(3).
%p for n from 1 to 1230 do p := (ithprime(n+2)-ithprime(n)) / (ithprime(n+1)-ithprime(n) ) ; if type(p,'integer') then if isprime(p) then printf("%d,",p) ; end if; end if; end do: # _R. J. Mathar_, Apr 28 2010
%t Select[(#[[3]]-#[[1]])/(#[[2]]-#[[1]])&/@Partition[Prime[ Range[ 1000]],3,1],PrimeQ] (* _Harvey P. Dale_, Aug 20 2017 *)
%Y Cf. A000040.
%K nonn,less
%O 1,1
%A _Juri-Stepan Gerasimov_, Oct 06 2008
%E Sequence corrected from a(3) onwards by _R. J. Mathar_, Apr 28 2010
|