cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A232327 A generalized Engel expansion of 1/Pi.

Original entry on oeis.org

3, 23, 27, 89, 137, 9190, 25731, 80457, 125859, 270815, 609977, 959612, 1034186, 1491489, 2975032, 264484387, 1092196976, 1194228023, 1424193547, 4523998315, 13583506006, 380693793416, 1097951708621, 1486580651232
Offset: 0

Views

Author

Peter Bala, Nov 27 2013

Keywords

Comments

The Engel expansion of 1/Pi is given in A014012 and the Pierce (or alternating Engel) expansion of 1/Pi is found in A006283.
We can unify the algorithms for finding the Engel and Pierce expansions of a real number as follows.
Define the map f:[-1,1]\{0} -> (-1/2,1) by f(x) = x*ceiling(1/x) - 1 and let f^(n)(x) denote the n-th iterate of f, with the convention that f^(0)(x) = x. Let r be a real number such that 0 < r < 1.
Then the sequence of positive integers e(n) := ceiling(1/f^(n)(r)) is the Engel expansion of r. The associated Engel series representation is r = 1/e(0) + 1/(e(0)*e(1)) + 1/(e(0)*e(1)*e(2)) + ....
The sequence of positive integers p(n) := |ceiling(1/f^(n)(-r))| is the Pierce expansion of r. The associated Pierce series representation is r = 1/p(0) - 1/(p(0)*p(1)) + 1/(p(0)*p(1)*p(2)) - ....
By working with a modification of the map f we can find two generalized Engel-type expansions for the real number r (still assuming 0 < r < 1). To this end, we define the map g:[-1,1]\{0} -> (-1/2,1) by g(x) = -x*ceiling(-1/x) - 1 and let g^(n)(x) denote the n-th iterate of g, with the convention that g^(0)(x) = x.
A)
Our first generalized expansion of r is the integer sequence a(n) := |ceiling(1/g^(n)(r))| for n >= 0 and until g^n(r) = 0. It can be shown that we have a generalized Engel-type representation for r by means of the (possibly infinite) series r = 1/a(0) - 1/(a(0)*a(1)) - 1/(a(0)*a(1)*a(2)) + 1/(a(0)*a(1)*a(2)*a(3)) + 1/(a(0)*a(1)*a(2)*a(3)*a(4)) - - + + ..., where the pattern of signs of the terms is as indicated.
The series will be finite if and only if r is rational.
The present sequence is an example of this first type of generalized Engel expansion for the real number r := 1/Pi.
B)
The second generalized Engel expansion of r is defined as the sequence of integers b(n) := |ceiling(1/g^(n)(-r))| for n >= 0 and until g^(n)(-r) = 0.
It can be shown that we now have a generalized Engel-type representation for r of the form r = 1/b(0) + 1/(b(0)*b(1)) - 1/(b(0)*b(1)*b(2)) - 1/(b(0)*b(1)*b(2)*b(3)) + + - - ....
Again, the series terminates when r is rational, otherwise it is infinite.
See A232328 for the generalized Engel expansion of 1/Pi of the second kind.
We can generalize the Engel and Pierce expansions of a real number even further by considering series expansions to a base b. See A232325 for a definition and details. The usual Engel and Pierce expansions occur when the base b = 1 and the two generalized Engel expansions described above arise when the base b = -1.

Examples

			Comparison of the Engel, alternating Engel and generalized Engel series expansions for 1/Pi.
A014012: Engel series expansion
1/Pi = 1/4 + 1/(4*4) + 1/(4*4*11) + 1/(4*4*11*45) + 1/(4*4*11*45*70) + ...
A006283: Alternating Engel series expansion
1/Pi = 1/3 - 1/(3*22) + 1/(3*22*118) - 1/(3*22*118*383) + 1/(3*22*118*83*571) - ...
A232327: Generalized Engel series expansion of the first kind
1/Pi = 1/3 - 1/(3*23) - 1/(3*23*27) + 1/(3*23*27*89) + 1/(3*23*27*89*137) - - + + ....
A232328: Generalized Engel series expansion of the second kind
1/Pi = 1/4 + 1/(4*3) - 1/(4*3*6) - 1/(4*3*6*12) + 1/(4*3*6*12*51) + 1/(4*3*6*12*51*146) - - + + ...
		

Crossrefs

Programs

  • Maple
    #A232327
    #Define the n-th iterate of the map f(x) = x/b*ceiling(b/x) - 1
    map_iterate := proc(n,b,x) option remember;
    if n = 0 then
       x
    else
       -1 + 1/b*thisproc(n-1,b,x)*ceil(b/thisproc(n-1,b,x))
    end if
    end proc:
    #Define the terms of the expansion of x to the base b
    a := n -> ceil(evalf(b/map_iterate(n,b,x))):
    Digits := 500:
    #Choose values for x and b
    x := 1/Pi: b:= -1:
    seq(abs(a(n)), n = 0..25);

Formula

a(n) = ceiling(1/g^(n)(1/Pi)), where g(x) = -x*ceiling(-1/x) - 1.
Generalized Engel series expansion:
1/Pi = 1/3 - 1/(3*23) - 1/(3*23*27) + 1/(3*23*27*89) + 1/(3*23*27*89*137) - - + +.

A303877 Expansion of 1 in base Pi, 1 = Sum_{n>=0} a(n)/Pi^(n+1).

Original entry on oeis.org

3, 0, 1, 1, 0, 2, 1, 1, 1, 0, 0, 2, 0, 2, 2, 1, 1, 3, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 1, 0, 2, 2, 2, 2, 1, 2, 2, 1, 2, 0, 2, 0, 1, 2, 1, 2, 0, 2, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 1, 2, 1, 0, 1, 2, 0, 0, 0, 0, 2, 2, 1, 1, 0, 0, 2, 2, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 2, 2, 1, 0, 0, 1, 1, 0, 2, 2, 0, 2, 2, 0, 2, 0, 2, 1, 1
Offset: 0

Views

Author

Simon Plouffe, May 02 2018

Keywords

Comments

Using a simple greedy algorithm.
Apart from a leading 3 the same as A188921. - R. J. Mathar, May 07 2018

Examples

			1 = 0.30110211100202211300010200021022221221202..._{Pi}
		

Crossrefs

Programs

  • Maple
    r2bk:=proc(s, b)
    local i, j, v, premier, fin, lll, liste, w, baz;
        baz := evalf(b);
        v := abs(evalf(s));
        fin := trunc(evalf(Digits/log10(b))) - 10;
        lll := [seq(baz^j, j = 1 .. fin)];
        liste := [];
        for i to fin do w := trunc(v*lll[i]); v := v - w/lll[i]; liste := [op(liste), w] end do;
        RETURN(liste)
    end;
    # enter a real number s and a base b > 1; b can be a real number, too.

A232326 Pierce expansion of 1 to the base Pi.

Original entry on oeis.org

3, 69, 310, 1017, 36745, 214369, 966652, 11159821, 74039764, 550021544, 4481549430, 16543857917, 87205978613, 476981856953, 30989048525367, 203786458494160, 711639924282497, 3174772986229899, 29814569078896025, 100158574806804154
Offset: 0

Views

Author

Peter Bala, Nov 26 2013

Keywords

Comments

Let r and b be positive real numbers. We define a Pierce expansion of r to the base b to be a (possibly infinite) increasing sequence of positive integers [a(0), a(1), a(2), ...] such that we have the alternating series representation r = b/a(0) - b^2/(a(0)*a(1)) + b^3/(a(0)*a(1)*a(2)) - .... Depending on the values of r and b such an expansion may not exist, and if it does exist it may not be unique. When b = 1 and 0 < r < 1 we recover the ordinary Pierce expansion of r.
See A058635, A192223 and A230600 for some predictable Pierce expansions to a base b other than 1.
In the particular case that the base b >= 1 and 0 < r < b then we can find a Pierce expansion of r to the base b as follows:
Define the map f(x) (which depends on the base b) by f(x) = x/b*ceiling(b/x) - 1 and let f^(n)(x) denote the n-th iterate of the map f(x), with the convention that f^(0)(x) = x.
For n = 0,1,2,... define a(n) = ceiling(b/f^(n)(-r)) until f^n(-r) = 0.
Then it can be shown that the sequence of positive integers |a(n)| is a Pierce expansion of r to the base b.
For the present sequence we apply this algorithm with r := 1 and with base b := Pi. See A232325 for an Engel expansion of 1 to the base Pi.

Crossrefs

Programs

  • Maple
    # Define the n-th iterate of the map f(x) = x/b*ceiling(b/x) - 1
    map_iterate := proc(n,b,x) option remember;
    if n = 0 then
       x
    else
       -1 + 1/b*thisproc(n-1,b,x)*ceil(b/thisproc(n-1,b,x))
    end if
    end proc:
    # Define the (signed) terms of the expansion of x to the base b
    a := n -> ceil(evalf(b/map_iterate(n,b,x))):
    Digits:= 500:
    # Choose values for x and b
    x := -1: b:= Pi:
    seq(abs(a(n)), n = 0..19);

Formula

a(n) = ceiling(Pi/f^(n)(-1)), where f^(n)(x) denotes the n-th iterate of the map f(x) = x/Pi*ceiling(Pi/x) - 1, with the convention that f^(0)(x) = x.
Pierce series expansion of 1 to the base Pi:
1 = Pi/3 - Pi^2/(3*69) + Pi^3/(3*69*310) - Pi^4/(3*69*310*1017) + ....
The associated power series F(z) := 1 - ( z/3 - z^2/(3*69) + z^3/(3*69*310) - z^4/(3*69*310*1017) + ...) has a zero at z = Pi. Truncating the series F(z) to n terms produces a polynomial F_n(z) with rational coefficients which has a real zero close to Pi.

A280095 Engel expansion of phi to the base Pi.

Original entry on oeis.org

2, 105, 617, 3077, 9757, 71731, 306407, 2071853, 10770894, 185768753, 1672941615, 14465494561, 338610760068, 1260607468485, 5168248479349, 151720540392580, 1384591426590643, 30464122079618738, 121074568909128689, 574695040334652831
Offset: 0

Views

Author

G. C. Greubel, Dec 25 2016

Keywords

Comments

The Mathematica code provided calculates (1+ sqrt(5))/4 and yields the Engel expansion (1+sqrt(5))/4 = Pi/4 + Pi^2/(4*105) + O(Pi^6). Multiplying this expansion by 2 gives this sequence.

Examples

			phi = Pi/2 + Pi^2/(2*105) + Pi^3/(2*105*617) + ...
		

Crossrefs

Cf. A232325.

Programs

  • Mathematica
    EngelExp[A_, n_] := Join[Array[Pi &, Floor[A]], First@Transpose@
    NestList[{Ceiling[Pi/Expand[#[[1]] #[[2]] - 1]], Expand[#[[1]] #[[2]] - 1]/Pi} &, {Ceiling[Pi/(A - Floor[A])], (A - Floor[A])/Pi}, n - 1]]; EngelExp[N[(1 + Sqrt[5])/4, 7!], 20]

A280096 Engel expansion of 1/phi to the base Pi.

Original entry on oeis.org

6, 18, 95, 340, 9492, 133706, 1693729, 104107693, 692068995, 3295399249, 61983607042, 294907287147, 3866887203952, 1457331336561977, 13487103824303426, 2733476358186221751, 10531585738509590966, 622459086032261357787, 13355793438644297530372, 210369234254618733763935
Offset: 0

Views

Author

G. C. Greubel, Dec 25 2016

Keywords

Examples

			1/phi = Pi/6 + Pi^2/(6*18) + Pi^3/(6*18*95) + ...
		

Crossrefs

Cf. A232325.

Programs

  • Mathematica
    EngelExp[A_, n_] := Join[Array[Pi &, Floor[A]], First@Transpose@
    NestList[{Ceiling[Pi/Expand[#[[1]] #[[2]] - 1]], Expand[#[[1]] #[[2]] - 1]/Pi} &, {Ceiling[Pi/(A - Floor[A])], (A - Floor[A])/Pi}, n - 1]]; EngelExp[N[2/(1 + Sqrt[5]), 7!], 20]

A280102 Engel expansion of e to the base Pi.

Original entry on oeis.org

2, 5, 20, 89, 809, 10704, 145989, 2054864, 19686928, 128199160
Offset: 0

Views

Author

G. C. Greubel, Dec 25 2016

Keywords

Examples

			e = Pi/2 + Pi^2/(2*5) + Pi^3/(2*5*20) + Pi^4/(2*5*20*89) + Pi^5/(2*5*20*89*809) + ...
		

Crossrefs

Cf. A232325.

A280103 Engel expansion of 1/e in the base Pi.

Original entry on oeis.org

9, 59, 258, 1621, 41718, 163096, 18032586, 372522402, 4134015746, 32288273026, 351014976193, 4870192684354, 16888414224772, 69504582263701, 605288885084501, 142251062156316087, 465610991052284457, 1483900314571047497, 5622121203907195494, 23213137436116662167
Offset: 0

Views

Author

G. C. Greubel, Dec 25 2016

Keywords

Crossrefs

Programs

  • Mathematica
    EngelExp[A_, n_] := Join[Array[Pi &, Floor[A]], First@Transpose@
    NestList[{Ceiling[Pi/Expand[#[[1]] #[[2]] - 1]], Expand[#[[1]] #[[2]] - 1]/Pi} &, {Ceiling[Pi/(A - Floor[A])], (A - Floor[A])/Pi}, n - 1]]; EngelExp[N[1/E, 7!], 20]
Showing 1-7 of 7 results.