%I #10 Oct 20 2019 06:10:50
%S 2,3,7,13,19,29,31,41,43,59,67,71,73,89
%N Amenable primes of order 3. Primes p such that the numerator and denominator of the continued fraction rational approximation of sqrt(p) are both prime and the numerator is less than 10^3 digits in length.
%C Amenable primes of order k are also amenable primes of order k+1.
%e 13 is a term because 7/2 is a rational convergent of sqrt(13), the length of 7 is < 10^3, and 7 and 2 are primes. 11/3 is the only other convergent for sqrt(13) that has a numerator < 10^3 digits.
%o (PARI) cfracnumdenomprime(m,f) = { default(realprecision,3000); cf = vector(m+10); x=f; for(n=0,m, i=floor(x); x=1/(x-i); cf[n+1] = i; ); for(m1=0,m, r=cf[m1+1]; forstep(n=m1,1,-1, r = 1/r; r+=cf[n]; ); numer=numerator(r); denom=denominator(r); if(ispseudoprime(numer)&&ispseudoprime(denom),print1(numer",");numer2=numer;denom2=denom); if(length(Str(numer))>999,break); ) }
%K frac,nonn,base
%O 1,1
%A _Cino Hilliard_, Jan 16 2005