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

%I #25 Nov 22 2022 06:05:12

%S 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,

%T 46,114,20,70,6,38,190,44,76,14,118,218,34,14,82,32,28,110,76,126,230,

%U 46,578,138,192,306,424,38,148,468,218,210,174,300,244,60,744,482,190,344

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

%C 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.

%C 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.

%F 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.

%e 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:

%e 2 = 3/1, 2 + 1/1 = 3 = 3/1, 2 + 1/(1 + 1/1) = 2 + 1/2 = 5/2, ...

%e 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.

%e 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/(...).

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

%o (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)

%o (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.

%Y Cf. A072999 (prime denominators), A083699 (numerators), A083700 (decimal).

%K cofr,nonn

%O 0,2

%A _Paul D. Hanna_, May 03 2003

%E Edited by _M. F. Hasler_, Dec 29 2019, merging information from the duplicate A209270, following an observation by Hans Havermann on the SeqFan list.

%E Initial a(0) = 0 added by _N. J. A. Sloane_, Dec 30 2019

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 25 12:15 EDT 2024. Contains 371969 sequences. (Running on oeis4.)