login
Decimal expansion of the continued fraction whose terms are half the gaps of the odd nonprimes A014076.
2

%I #26 Jan 21 2022 23:30:56

%S 4,3,0,3,2,3,9,3,0,1,9,8,3,1,2,2,5,4,7,5,0,7,2,5,6,5,3,7,1,2,9,4,6,1,

%T 0,1,1,0,0,5,8,7,4,9,8,2,5,6,1,5,9,3,3,2,7,6,9,9,6,6,3,7,1,8,1,0,8,6,

%U 7,0,5,5,2,1,6,2,6,3,9,5,7,8,9,0,1,9,6,0,0,2,4,3,7,4,8,7,1,5,5,8,7,3,6,9,2

%N Decimal expansion of the continued fraction whose terms are half the gaps of the odd nonprimes A014076.

%C Take half of the first difference of odd nonprimes A014076 and treat it as a continued fraction. This sequence gives the decimal expansion of that number. - _Charles R Greathouse IV_, Feb 03 2011

%H G. C. Greubel, <a href="/A142723/b142723.txt">Table of n, a(n) for n = 1..5000</a>

%e 4.30323930198312254750725653712946101100587498256159332769966371810867...

%t a = Flatten[Table[If[PrimeQ[2*n + 1], {}, 2*n - 1], {n, 0, 200}]]; b = Table[(a[[n + 1]] - a[[n]])/2, {n, 1, Length[a] - 1}]; FromContinuedFraction[b]; c = N[%, 200]; Table[Floor[Mod[c*10^n, 10]], {n, 0, 201}] (* Bagula and Adamson *)

%t RealDigits[FromContinuedFraction[Differences[Select[Range[-1, 399, 2], !PrimeQ[# + 2]&]]/2], 10, 201][[1]] (* _Charles R Greathouse IV_, Feb 03 2011 *)

%o (PARI) a=contfracpnqn(D(select(vector(99,n,2*n-1),x->!isprime(x)))/2); a[1,1]/a[2,1]*1. /* OK for 35 digits. For D(.) see A137822 */ \\ _M. F. Hasler_, Sep 29 2011

%K nonn,cons

%O 1,1

%A _Roger L. Bagula_ and _Gary W. Adamson_, Sep 27 2008