%I #23 May 13 2017 11:53:10
%S 1,4,52,106
%N Start with the fraction 1/1, list n when the numerator and denominator are both prime for fractions built according to the rule: Add old top and old bottom to get the new bottom, add old top and 6 times the old bottom to get the new top.
%C k is the multiple 6 in the PARI code. The sequence of fractions found with the property that both numerator and denominator are prime is as follows.
%C n, num/denom
%C 1, 7/2
%C 4, 241/101
%C 52, 15848109838244286131940714481/6469963748546758449049574741
%C 106, 1732765524527243824670663837908764472971413888795440694899 / 7073985631629662697450635044051857198371361627935450689
%C From _Robert Israel_, Aug 12 2016: (Start)
%C n such that A002532(n+1) and A002533(n+1) are both prime.
%C Note that A002532(n+1) and A002533(n+1) are always coprime, so the fractions are in lowest terms.
%C No other terms <= 12000.
%C Heuristically we would expect A002532(n+1) to be prime with probability ~ constant/n and A002533(n+1) to be prime with probability ~ constant/n, so both prime with probability ~ constant/n^2.
%C Since Sum_n 1/n^2 converges, we should expect this sequence to be finite.
%C Since A002532(n+1) is divisible by 2 if n is odd and by 3 if n == 2 (mod 3), all terms after the first == 0 or 4 (mod 6). (End)
%D Prime Obsession, John Derbyshire, Joseph Henry Press, April 2004, p. 16.
%F Given A(0)=1,B(0)=1 then for i=1,2,.. A(i)/B(i) = (A(i-1)+6*B(i-1))/(A(i-1)+B(i-1)).
%F A(n) = A002532(n+1). B(n) = A002533(n+1). - _Robert Israel_, Aug 12 2016
%e The first four fractions according to the rule are
%e n,
%e 1,7/2
%e 2,19/9
%e 3,73/28
%e 4,241/101
%e n=2,3 did not make the list because 9 and 28 are not prime.
%p A:= gfun:-rectoproc({a(n+2)-2*a(n+1)-5*a(n), a(0)=1, a(1)=7},a(n), remember):
%p B:= gfun:-rectoproc({a(n+2)-2*a(n+1)-5*a(n), a(0)=1, a(1)=2},a(n),remember):
%p select(n -> isprime(A(n)) and isprime(B(n)), [1,seq(seq(6*k+j,j=[0,4]),k=0..1000)]); # _Robert Israel_, Aug 12 2016
%t Position[Rest@ NestList[{Numerator@ #, Denominator@ #} &[(#1 + 6 #2)/(#1 + #2)] & @@ # &, {1, 1}, 2000], k_ /; Times @@ Boole@ Map[PrimeQ, k] == 1] // Flatten (* _Michael De Vlieger_, May 13 2017 *)
%o (PARI) primenumdenom(n,k) = { local(a,b,x,tmp,v); a=1;b=1; for(x=1,n, tmp=b; b=a+b; a=k*tmp+a; if(tmp=1,v=a,v=b); if(ispseudoprime(a)&ispseudoprime(b),print1(x","); ) ); print(); print(a/b+.) }
%Y Cf. A002532, A002533.
%K more,nonn
%O 1,2
%A _Cino Hilliard_, Oct 02 2005, Jul 05 2007
|