

A083698


Partial quotients of the continued fraction which has convergents with the least possible prime denominators (A072999).


6



0, 2, 1, 1, 2, 2, 4, 6, 8, 4, 6, 38, 10, 14, 16, 6, 2, 12, 24, 100, 36, 74, 46, 44, 52, 18, 8, 46, 114, 20, 70, 6, 38, 190, 44, 76, 14, 118, 218, 34, 14, 82, 32, 28, 110, 76, 126, 230, 46, 578, 138, 192, 306, 424, 38, 148, 468, 218, 210, 174, 300, 244, 60, 744, 482, 190, 344
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

Equivalently: a(1) = 2 and for n >= 2, a(n) is the least integer such that the numerator of the continued fraction [a(1),a(2),...,a(n)] is prime.
These prime numerators, listed in A072999, are the same as the prime denominators in the definition of this sequence A083698. The equivalence comes from the fact that 1/[a1, ..., aN] = [0, a1, ..., aN] for any continued fraction [a1, ..., aN] with a1 != 0. That is, numerators and denominators of the convergents are exchanged when considering the continued fraction with/without integer part, which amounts to inserting or deleting a leading 0.


LINKS



FORMULA



EXAMPLE

The partial quotients of the continued fraction 2 + 1/(1 + 1/(1 + 1/(2 + 1/(2 + 1/(4 + ...))))) are by definition the coefficients [2, 1, 1, 2, 2, 4, ...]. The convergents of this continued fraction are:
2 = 3/1, 2 + 1/1 = 3 = 3/1, 2 + 1/(1 + 1/1) = 2 + 1/2 = 5/2, ...
Here the primes listed in A072999 appear as numerators (cf. equivalent definition in comments). These primes appear as denominators if the terms [2, 1, 1, 2, 2, 4, ...] are considered as coefficients that appear in the pure fraction 1/(a(1) + 1/(a(2) + 1/...))), with convergents: 1/2, 1/(2 + 1/1) = 1/3, 1/(5/2) = 2/5, etc.
This amounts to including the initial a(0) = 0 for the integer part, which "shifts down into the denominator" the coefficients (2, 1, 1, ...) of the earlier mentioned continued fraction 2 + 1/(...).


MATHEMATICA

Nest[Append[#, Block[{k = 1}, While[! PrimeQ@ Denominator@ FromContinuedFraction@ Append[#, k], k++]; k]] &, {2}, 64] (* Michael De Vlieger, Dec 22 2019 *)


PROG

(PARI) l=1; h=2; print1(h, ", "); while(l<2^512, t=l+h; while(!isprime(t), t+=h); print1(floor(t/h), ", "); l=h; h=t)
(PARI) v=[2]; for(k=1, 70, m=1; while(isprime(contfracpnqn(concat(v, [m]))[1, 1])==0, m++); v=concat(v, [m])); a(n)=if(n<2, 2, v[n]); \\ Benoit Cloitre, Jan 15 2013.


CROSSREFS



KEYWORD

cofr,nonn


AUTHOR



EXTENSIONS

Edited by M. F. Hasler, Dec 29 2019, merging information from the duplicate A209270, following an observation by Hans Havermann on the SeqFan list.


STATUS

approved



