login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
a(0) = 0, a(1) = 2, a(n) = floor(A072999(n)/A072999(n-1)) for n > 1. By definition, when n > 2, a(n) = (A072999(n)-A072999(n-2))/A072999(n-1) exactly.
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
Cf. A072999 (prime denominators), A083699 (numerators), A083700 (decimal).
Sequence in context: A361933 A036863 A209270 * A128976 A199627 A153902
KEYWORD
cofr,nonn
AUTHOR
Paul D. Hanna, May 03 2003
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.
Initial a(0) = 0 added by N. J. A. Sloane, Dec 30 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 12:44 EDT 2024. Contains 371913 sequences. (Running on oeis4.)