[go: up one dir, main page]

login
Search: a003417 -id:a003417
     Sort: relevance | references | number | modified | created      Format: long | short | data
Decimal expansion of the number whose continued fraction expansion is A292106.
+10
5
6, 1, 4, 2, 2, 0, 1, 7, 6, 3, 0, 9, 3, 0, 2, 6, 4, 1, 2, 5, 5, 9, 4, 6, 5, 1, 0, 6, 4, 5, 7, 8, 7, 0, 8, 5, 8, 8, 5, 1, 9, 2, 8, 3, 3, 0, 7, 1, 0, 7, 3, 8, 7, 3, 2, 3, 2, 8, 0, 4, 7, 5, 4, 8, 5, 0, 2, 9, 6, 0, 2, 4, 9, 4, 0, 9, 6, 1, 8, 1, 3, 8, 7, 2, 3, 6, 5, 0, 9, 8, 0, 1, 0, 9, 0, 3, 3, 0, 4, 6, 2, 7, 4, 6
OFFSET
1,1
COMMENTS
Another version of the "e*Pi" constant (cf. A292101).
EXAMPLE
6.142201763093026412559465106457...
MATHEMATICA
With[{nmax=100}, First[RealDigits[FromContinuedFraction[ContinuedFraction[E, nmax]ContinuedFraction[Pi, nmax]], 10, nmax]]] (* Paolo Xausa, Oct 23 2023 *)
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
N. J. A. Sloane, Sep 14 2017
EXTENSIONS
More digits from Alois P. Heinz, Sep 14 2017
STATUS
approved
Continued fraction for e^3.
+10
4
20, 11, 1, 2, 4, 3, 1, 5, 1, 2, 16, 1, 1, 16, 2, 13, 14, 4, 6, 2, 1, 1, 2, 2, 2, 3, 5, 1, 3, 1, 1, 68, 7, 5, 1, 4, 2, 1, 1, 1, 1, 1, 1, 7, 3, 1, 6, 1, 2, 5, 4, 7, 2, 1, 3, 2, 2, 1, 2, 1, 4, 1, 1, 13, 1, 1, 2, 1, 1, 1, 1, 3, 7, 11, 18, 54, 1, 2, 2, 2, 1, 1, 6, 2, 2, 46, 2, 189, 1, 24, 1, 8, 13, 4, 1, 1
OFFSET
0,1
LINKS
K. Matthews, Finding the continued fraction of e^(l/m) ["... there is no known formula for the partial quotients of the continued fraction expansion of e^3, or more generally e^(l/m) with l distinct from 1,2 and gcd(l,m)=1..."]
G. Xiao, Contfrac
EXAMPLE
20.085536923187667740928529... = 20 + 1/(11 + 1/(1 + 1/(2 + 1/(4 + ...)))). - Harry J. Smith, Apr 30 2009
MAPLE
with(numtheory); Digits:=200: cf:=convert(evalf( exp(3)), confrac); # N. J. A. Sloane, Sep 05 2012
MATHEMATICA
ContinuedFraction[ E^3, 100]
PROG
(PARI) contfrac(exp(1)^3)
(PARI) { allocatemem(932245000); default(realprecision, 21000); x=contfrac(exp(3)); for (n=1, 20001, write("b058282.txt", n-1, " ", x[n])); } \\ Harry J. Smith, Apr 30 2009
CROSSREFS
KEYWORD
cofr,nonn,easy
AUTHOR
Robert G. Wilson v, Dec 07 2000
EXTENSIONS
More terms from Jason Earls, Jul 10 2001
STATUS
approved
a(n) = ceiling(n/3)^2 - floor(n/3)^2.
+10
4
0, 1, 1, 0, 3, 3, 0, 5, 5, 0, 7, 7, 0, 9, 9, 0, 11, 11, 0, 13, 13, 0, 15, 15, 0, 17, 17, 0, 19, 19, 0, 21, 21, 0, 23, 23, 0, 25, 25, 0, 27, 27, 0, 29, 29, 0, 31, 31, 0, 33, 33, 0, 35, 35, 0, 37, 37, 0, 39, 39, 0, 41, 41, 0, 43, 43, 0, 45, 45, 0, 47, 47, 0, 49, 49, 0, 51, 51, 0, 53, 53, 0
OFFSET
0,5
COMMENTS
If n is a multiple of 3, then a(n) = 0, and if n is of the form 3k+r, with r = 1 or 2, then a(n) = 2*k + 1. - Antti Karttunen, Apr 14 2022
REFERENCES
Maria Paola Bonacina and Nachum Dershowitz, Canonical Inference for Implicational Systems, in Automated Reasoning, Lecture Notes in Computer Science, Volume 5195/2008, Springer-Verlag.
FORMULA
G.f.: x*(1+x+x^3+x^4)/(1-2*x^3+x^6).
a(n) = A011655(n)*A004396(n).
a(n) = (2/3)*floor((2*n+1)/3)*(1-cos(2*Pi*n/3)).
From M. F. Hasler, Dec 13 2007: (Start)
a(n) = |A120691(n+1)| for n>0.
a(n) = ([n/3]*2 + 1)*dist(n,3Z). (End)
a(n) = 2*sin(n*Pi/3)*(4*n*sin(n*Pi/3)-sqrt(3)*cos(n*Pi))/9. - Wesley Ivan Hurt, Sep 24 2017
a(n) = 2*a(n-3) - a(n-6), for n > 5. - Chai Wah Wu, Jul 27 2022
MATHEMATICA
LinearRecurrence[{0, 0, 2, 0, 0, -1}, {0, 1, 1, 0, 3, 3}, 90] (* G. C. Greubel, Dec 09 2022 *)
PROG
(PARI) A102899(n)=(n\3*2+1)*(0<n%3) \\ M. F. Hasler, Dec 13 2007
(Magma) I:=[0, 1, 1, 0, 3, 3]; [n le 6 select I[n] else 2*Self(n-3) - Self(n-6): n in [1..91]]; // G. C. Greubel, Dec 09 2022
(SageMath)
def A102899(n): return (1+2*(n//3))*((n%3)>0)
[A102899(n) for n in range(91)] # G. C. Greubel, Dec 09 2022
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jan 17 2005
STATUS
approved
Second terms of continued fractions for power towers e, e^e, e^e^e, ...
+10
4
OFFSET
1,2
COMMENTS
It was conjectured (but remains unproved) that none of the power towers e, e^e, e^e^e, ... are integers. If so, the corresponding continued fractions contain at least 2 terms. If the conjecture fails, let the corresponding a(n) = 0.
LINKS
Eric Weisstein's World of Mathematics, e.
Eric Weisstein's World of Mathematics, Power Tower
EXAMPLE
a(3) = 9 because floor(1/frac(e^e^e)) = 9, since e^e^e ~ 3814279.10476.
MATHEMATICA
$MaxExtraPrecision = Infinity; terms = 4; Map[Function[x, ContinuedFraction[x, 2][[2]]], NestList[Exp, E, terms - 1]]
CROSSREFS
A056072 yields the first term of the continued fraction.
KEYWORD
nonn,hard,more
AUTHOR
STATUS
approved
Left(0)/right(1) turning sequence needed to traverse the Stern-Brocot tree (A007305, A047679) from the root down to e (A001113).
+10
4
1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
1
COMMENTS
The sequence has the following regular pattern: 1 0{0} 1 0 1{2} 0 1 0{4} 1 0 1{6} 0 1 0{8} ... where {r} indicates that the preceding term is repeated r times.
Run lengths of this sequence (A003417) are the coefficients of the continued fraction for e.
The positions of zeros and ones are given by A358510 and A358511, respectively. - Paolo Xausa, Nov 20 2022
REFERENCES
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd Edition, Addison-Wesley, 1989, p. 115-123.
LINKS
Michael De Vlieger, 2^11 X 2^11 bitmap of a(n), n = 1..2^22, where white represents 0 and black represents 1.
Michael De Vlieger, Binary tree of a(n), n = 1..2^14-1, where dark blue represents 0 and red represents 1.
FORMULA
The sequence begins with
floor(e / 1) = A003417(1) ones, followed by
floor(1 / (e mod 1)) = A003417(2) zeros, followed by
floor((e mod 1) / (1 mod (e mod 1))) = A003417(3) ones, followed by
floor((1 mod (e mod 1)) / ((e mod 1) mod (1 mod (e mod 1)))) = A003417(4) zeros
...
From Paolo Xausa, Nov 20 2022: (Start)
a(A358510(n)) = 0.
a(A358511(n)) = 1.
Limit_{n->oo} (1/n)*Sum_{i=1..n} a(i) = 1/2. (End)
EXAMPLE
In the initial portion of the Stern-Brocot tree shown below, the arrows indicate the traversing route.
1/1
|
.----------------->-----. Right (1)
| |
1/2 2/1
| |
.-----------. .-------->--. Right (1)
| | | |
1/3 2/3 3/2 3/1
| | | |
.-----. .-----. .-----. .-<---. Left (0)
| | | | | | | |
1/4 2/5 3/5 3/4 4/3 5/3 5/2 4/1
...
The first terms of the sequence are therefore 1, 1, 0.
MATHEMATICA
(* Generate up to 2^22 terms of this sequence from the 2^11 X 2^11 bitmap *)
With[{rows = 12}, ImageData[Import["https://oeis.org/A342991/a342991.png"]][[1 ;; rows]] /. {0. -> 1, 1. -> 0} // Flatten] (* Michael De Vlieger, Nov 04 2022 *)
A342991[i_]:=Flatten[Array[{1, PadRight[{}, 4#], 1, 0, PadRight[{}, 2+4#, 1], 0}&, i, 0]]; (* Each iteration adds six runs of values *)
A342991[10] (* Paolo Xausa, Nov 20 2022 *)
PROG
(Python)
from itertools import count, islice
def A342991_gen(): # generator of terms
a = 0
yield from (1, 1)
for n in count(2):
q, r = divmod(n, 3)
yield from (a, )*(1 if r else q<<1)
a = 1-a
A342991_list = list(islice(A342991_gen(), 40)) # Chai Wah Wu, Nov 04 2022
(PARI)
A342991(iter) = concat(vector(iter, i, concat([1, vector((i-1)<<2), 1, 0, vector(2+(i-1)<<2, x, 1), 0]))); \\ Each iteration adds six runs of values
A342991(10) \\ Paolo Xausa, Nov 24 2022
(PARI) a(n) = my(r, s=sqrtint(n-1, &r)); bitand(s + (r<s-1 || r==s), 1); \\ Kevin Ryde, Nov 24 2022
KEYWORD
nonn,easy
AUTHOR
Paolo Xausa, Jul 21 2021
STATUS
approved
Let z(n) be e = exp(1.0) = 2.7182.... truncated to n decimal digits after the decimal point; sequence gives maximum element in the continued fraction for z(n).
+10
3
2, 3, 4, 12, 9, 10, 12, 11, 9, 10, 8, 22, 13, 13, 15, 12, 35, 30, 48, 18, 166, 166, 68, 40, 73, 137, 57, 1288, 62, 28, 416, 552, 138, 47, 24, 156, 110, 31, 463, 85, 108, 106, 295, 295, 54, 98, 40, 388, 216, 32, 49, 199, 488, 47, 64, 822, 51, 152, 854, 38, 701, 88, 94, 149
OFFSET
0,1
EXAMPLE
... Here is Maple's computation of the first four terms of the sequence a:
....C2 := 2
....cf := [2]
....a := [2]
..........27
....C2 := --
..........10
....cf := [2, 1, 2, 3]
....a := [2, 3]
..........271
....C2 := ---
..........100
....cf := [2, 1, 2, 2, 4, 3]
....a := [2, 3, 4]
..........1359
....C2 := ----
..........500
....cf := [2, 1, 2, 1, 1, 4, 1, 12]
....a := [2, 3, 4, 12]
MAPLE
with(numtheory); Digits:=200:
C1 := exp(1.0);
for n from 1 to 100 do
C2:= floor(C1*10^(n-1))/10^(n-1);
cf := convert(evalf(C2), confrac):
a := [op(a), max(cf)];
od:
a; # N. J. A. Sloane, Jun 19 2024
MATHEMATICA
A081837[n_] := Max[ContinuedFraction[Floor[E*10^n]/10^n]];
Array[A081837, 100, 0] (* Paolo Xausa, Jun 21 2024 *)
CROSSREFS
Cf. A001113, A003417, A081836 (analogous for phi), A373866 (analogous for Pi).
KEYWORD
base,nonn
AUTHOR
Benoit Cloitre, Apr 11 2003
EXTENSIONS
Definition, initial term, and offset clarified by N. J. A. Sloane, Jun 19 2024 following a suggestion from Harvey P. Dale.
STATUS
approved
First differences of coefficients in the continued fraction for e.
+10
3
2, -1, 1, -1, 0, 3, -3, 0, 5, -5, 0, 7, -7, 0, 9, -9, 0, 11, -11, 0, 13, -13, 0, 15, -15, 0, 17, -17, 0, 19, -19, 0, 21, -21, 0, 23, -23, 0, 25, -25, 0, 27, -27, 0, 29, -29, 0, 31, -31, 0, 33, -33, 0, 35, -35, 0, 37, -37, 0, 39, -39
OFFSET
0,1
COMMENTS
First differences of A003417.
FORMULA
G.f.: (1-x)*(2+x+2*x^2-3*x^3-x^4+x^6)/(1-2*x^3+x^6).
a(n) = 2*C(0,n) -C(1,n) +2*sin(2*Pi*(n-1)/3)*floor((2*n-1)/3)/sqrt(3). [Sign corrected by M. F. Hasler, May 01 2013]
a(0)=2, a(1)=-1, for n>0: a(3*n-1) = 2*n-1, a(3*n) = 1-2*n, a(3*n+1) = 0. - M. F. Hasler, May 01 2013
a(n) = - a(n-1) - a(n-2) + a(n-3) + a(n-4) + a(n-5) for n > 6. - Chai Wah Wu, Jul 27 2022
a(n) = 0 if n mod 3 = 1, a(n) = (2*n-1)/3 if n mod 3 = 2, a(n) = (3-2*n)/3 otherwise, with a(0) = 2, and a(1) = -1. - G. C. Greubel, Dec 28 2022
MATHEMATICA
Join[{2}, Differences[ContinuedFraction[E, 120]]] (* or *) LinearRecurrence[{-1, -1, 1, 1, 1}, {2, -1, 1, -1, 0, 3, -3}, 120] (* Harvey P. Dale, Jun 08 2016 *)
PROG
(PARI) A120691(n)={n<2 && return(2-3*n); n=divrem(n-1, 3); if(n[2], -(1+n[1]*2)*(-1)^n[2])} \\ - M. F. Hasler, May 01 2013
(Magma) R<x>:=PowerSeriesRing(Integers(), 70); Coefficients(R!( (1-x)*(2+x+2*x^2-3*x^3-x^4+x^6)/(1-x^3)^2 )); // G. C. Greubel, Dec 28 2022
(SageMath)
def b(n):
if (n%3==1): return 0
elif (n%3==2): return (2*n-1)/3
else: return (3-2*n)/3
def A120691(n): return b(n) + (-1)^n*int(n<2)
[A120691(n) for n in range(71)] # G. C. Greubel, Dec 28 2022
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Jun 27 2006
STATUS
approved
Continued fraction for Pi + e.
+10
2
5, 1, 6, 7, 3, 21, 2, 1, 2, 2, 1, 1, 2, 3, 3, 2, 5, 2, 1, 1, 1, 1, 3, 1, 8, 4, 4, 1, 1, 1, 1, 8, 1, 4, 1, 5, 1, 1, 1, 2, 4, 3, 2, 1, 1, 2, 1, 10, 1, 4, 1, 2, 1, 12, 1, 8, 2, 7, 39, 365, 2, 15, 2, 25, 1, 2, 5, 3, 3, 9, 3, 1, 1, 9, 1, 1, 47, 1, 1, 18, 1, 1, 2, 6, 1, 1, 1, 4, 1, 3, 1, 1, 1, 1, 4, 1, 6, 37
OFFSET
0,1
COMMENTS
The question of the transcendence of the number Pi + e is still open.
EXAMPLE
a(1) = 5 because Pi + e = 5.859874482048838473822930854632165381954416493075065395941912220031...
5.859874482048838473822930854... = 5 + 1/(1 + 1/(6 + 1/(7 + 1/(3 + ...)))). - Harry J. Smith, May 31 2009
PROG
(PARI) \p 500; contfrac(Pi+exp(1))
(PARI) { allocatemem(932245000); default(realprecision, 21000); x=contfrac(Pi+exp(1)); for (n=1, 20000, write("b058651.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 31 2009
CROSSREFS
Cf. A059742 (decimal expansion).
KEYWORD
nonn,cofr,easy
AUTHOR
Avi Peretz (njk(AT)netvision.net.il), Dec 26 2000
EXTENSIONS
More terms from Jason Earls, Jun 28 2001
Offset changed by Andrew Howroyd, Aug 04 2024
STATUS
approved
Continued fraction for e/5.
+10
2
0, 1, 1, 5, 4, 2, 2, 2, 2, 2, 1, 1, 9, 1, 1, 3, 3, 2, 3, 3, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 3, 9, 1, 3, 3, 3, 4, 3, 3, 4, 1, 2, 2, 1, 4, 1, 2, 2, 1, 5, 9, 1, 5, 3, 3, 6, 3, 3, 6, 1, 2, 2, 1, 6, 1, 2, 2, 1, 7, 9, 1, 7, 3, 3, 8, 3, 3, 8, 1, 2, 2, 1, 8, 1, 2, 2, 1, 9, 9, 1, 9, 3, 3, 10, 3, 3, 10, 1, 2, 2, 1, 10, 1, 2
OFFSET
1,4
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1).
FORMULA
First 18 terms: 0, 1, 1, 5, 4, 2, 2, 2, 2, 2, 1, 1, 9, 1, 1, 3, 3, 2.
For k >= 1, a(19k)=a(19k+1)=a(19k+16)=a(19k+17)=3; a(19k+2)=a(19k+7)=2k; a(19k+3)=a(19k+6)=a(19k+8)=a(19k+11)=a(19k+14)=1; a(19k+4)=a(19k+5)=a(19k+9)= a(19k+10)=2; a(19k+12)=a(19k+15)=2k+1; a(19k+18)=2k+2.
MATHEMATICA
ContinuedFraction[E/5, 100] (* Paolo Xausa, Sep 21 2024 *)
PROG
(PARI) contfrac(exp(1)/5) \\ Michel Marcus, Dec 03 2013
CROSSREFS
Cf. A019762 (decimal expansion).
Cf. A003417 (e), A006083 (e/2), A006084 (e/3), A006085 (e/4).
KEYWORD
nonn,cofr,easy
AUTHOR
Benoit Cloitre, Apr 08 2003
STATUS
approved
Coefficients of series giving the best rational approximations to e.
+10
2
7, 497, 71071, 18107089, 7216769351, 4145592145057, 3243346361740927, 3315690551047089761, 4291382388990897826759, 6858633609184481948847121, 13266034908146716343647359647, 30540929340877940990799507474097
OFFSET
1,1
COMMENTS
The series giving the best rational approximations to e is e = 3 - 2/a(1) + 2/a(2) - 2/a(3) + ... The continued fraction for e is [2;1,2,1,1,4,1,1,6, 1,1,8...] and the above best approximations give every third convergent, the convergents deriving from [2;1], [2;1,2,1,1], [2;1,2,1,1,4,1, 1] and so forth.
LINKS
FORMULA
a(n+3) = (16*n^2 +96*n +141)*a(n+2) + (2*n+7)*(16*n^2 +64*n +61)/(2*n+3) * a(n+1) - (2*n+7)/(2*n+3) * a(n). This recurrence relationship is identical to A122533, for the best approximations to 1/e.
MATHEMATICA
RecurrenceTable[{a[n]== ((2*n-3)*(16*n^2 -3)*a[n-1] +(2*n+1)*(16*(n-1)^2 - 3)*a[n-2] -(2*n+1)*a[n-3])/(2*n-3), a[1]==7, a[2]==497, a[3]==71071}, a, {n, 30}] (* G. C. Greubel, Oct 27 2024 *)
PROG
(Magma) I:=[7, 497, 71071]; [n le 3 select I[n] else ((2*n-3)*(16*n^2 -3) *Self(n-1) +(2*n+1)*(16*(n-1)^2 -3)*Self(n-2) -(2*n+1)*Self(n-3))/(2*n-3): n in [1..30]]; // G. C. Greubel, Oct 27 2024
(SageMath)
@CachedFunction
def a(n): # a = A122523
if n<4: return (0, 7, 497, 71071)[n]
else: return ((2*n-3)*(16*n^2 -3)*a(n-1) +(2*n+1)*(16*(n-1)^2 -3)*a(n-2) -(2*n+1)*a(n-3))/(2*n-3)
[a(n) for n in range(1, 31)] # G. C. Greubel, Oct 27 2024
CROSSREFS
KEYWORD
frac,nonn
AUTHOR
Gene Ward Smith, Sep 17 2006
STATUS
approved

Search completed in 0.026 seconds