OFFSET
1,1
COMMENTS
Order in which the simple continued fraction generated is important. In this case increasing order.
LINKS
Abhiram R Devesh, Table of n, a(n) for n = 1..100
EXAMPLE
for a = 41, the set is [41, 43, 47, 53] in simple continued fraction is
41 + 1
----------------
43 + 1
---------
47 + 1
----
53
When reduced 4398061/107209; where 4398061 and 107209 are both primes.
MATHEMATICA
Select[Prime@ Range[10^4], AllTrue[{Numerator@ #, Denominator@ #} &@ FromContinuedFraction@ Prime@ Range[#, # + 3] &@ PrimePi@ #, PrimeQ] &] (* Michael De Vlieger, Apr 02 2016, Version 10 *)
cfpnQ[lst_]:=Module[{fcf=FromContinuedFraction[lst]}, AllTrue[{Numerator[ fcf], Denominator[ fcf]}, PrimeQ]]; Select[Partition[Prime[ Range[ 5000]], 4, 1], cfpnQ][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 06 2020 *)
CROSSREFS
KEYWORD
hard,nonn
AUTHOR
Abhiram R Devesh, Mar 25 2016
STATUS
approved