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.

Previous Showing 21-30 of 39 results. Next

A232325 Engel expansion of 1 to the base Pi.

Original entry on oeis.org

4, 12, 72, 2111, 14265, 70424, 308832, 4371476, 320218450, 1101000257, 14020589841, 102772320834, 963205851651, 5997003656523, 50649135127796, 640772902021920, 2101002284323870, 35029677728070645, 176996397541889098, 1433436623499128186
Offset: 0

Views

Author

Peter Bala, Nov 25 2013

Keywords

Comments

Let r and b be positive real numbers. We define an Engel expansion of r to the base b to be a (possibly infinite) nondecreasing sequence of positive integers [a(0), a(1), a(2), ...] such that we have the 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 we recover the ordinary Engel expansion of r. See A181565 and A230601 for some predictable Engel 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 an Engel expansion of r to the base b using the following algorithm:
Choose values for r and b.
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 the integer a(n) = ceiling(b/f^(n)(r)) until f^n(r) = 0.
When b >= 1 and 0 < r < b the sequence a(n) produced by this algorithm provides an Engel expansion of r to the base b.
For the present sequence we apply this algorithm with r := 1 and with the base b := Pi.
We can also get an alternating series representation for r in powers of b (still assuming b >= 1 and 0 < r < b), called a Pierce series expansion of r to the base b, by running the above algorithm but now with input values -r and base b. See A232326.
In addition, we can obtain two further series expansions for r in powers of b by running the algorithm with either the input values r and base -b or with the input values -r and base -b. See examples below. See A232327 and A232328 for other examples of these types of expansions.

Examples

			Truncation F_5(z) = 1 - ( z/4 + z^2/(4*12) + z^3/(4*12*72) + z^4/(4*12*72*2111) + z^5/(4*12*72*2111*14265) ). The polynomial has a positive real zero at z = 3.14159 26535 (9...), which agrees with Pi to 10 decimal places.
Comparison of generalized Engel expansions of 1 to the base Pi.
A232325: Engel series expansion of 1 to the base Pi
1 = Pi/4 + Pi^2/(4*12) + Pi^3/(4*12*72) + Pi^4/(4*12*72*2111) + ....
A232326: 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) + - ....
Running the algorithm with the input values r = 1 and base -Pi produces the expansion
1 = Pi/3 - Pi^2/(3*70) - Pi^3/(3*70*740) + Pi^4/(3*70*740*6920) + - - + ....
Running the algorithm with the input values r = -1 and base -Pi produces the expansion
1 = Pi/4 + Pi^2/(4*11) - Pi^3/(4*11*73) - Pi^4/(4*11*73*560) + + - - ....
		

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 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(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.
Engel series expansion of 1 to the base Pi:
1 = Pi/4 + Pi^2/(4*12) + Pi^3/(4*12*72) + Pi^4/(4*12*72*2111) + ....
The associated power series F(z) := 1 - ( z/4 + z^2/(4*12) + z^3/(4*12*72) + z^4/(4*12*72*2111) + ...) 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. See below for an example.

A135351 a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; or a(0) = 0 and for n > 0, a(n) = A005578(n-1) - (-1)^n.

Original entry on oeis.org

0, 2, 0, 3, 2, 7, 10, 23, 42, 87, 170, 343, 682, 1367, 2730, 5463, 10922, 21847, 43690, 87383, 174762, 349527, 699050, 1398103, 2796202, 5592407, 11184810, 22369623, 44739242, 89478487, 178956970, 357913943, 715827882, 1431655767, 2863311530, 5726623063, 11453246122, 22906492247, 45812984490
Offset: 0

Views

Author

Miklos Kristof, Dec 07 2007

Keywords

Comments

Partial sums of A155980 for n > 2. - Klaus Purath, Jan 30 2021

Crossrefs

Cf. A007583, A062092, A087289, A020988 (even bisection), A163834 (odd bisection), A078008, A084247, A181565.

Programs

  • GAP
    List([0..40], n-> (2^n+3-7*(-1)^n+3*0^n)/6); # G. C. Greubel, Sep 02 2019
  • Magma
    a135351:=func< n | (2^n+3-7*(-1)^n+3*0^n)/6 >; [ a135351(n): n in [0..32] ]; // Klaus Brockhaus, Dec 05 2009
    
  • Maple
    G(x):=x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)): f[0]:=G(x): for n from 1 to 30 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n]/n!,n=0..30);
  • Mathematica
    Join[{0}, Table[(2^n +3 -7*(-1)^n)/6, {n,40}]] (* G. C. Greubel, Oct 11 2016 *)
    LinearRecurrence[{2,1,-2},{0,2,0,3},40] (* Harvey P. Dale, Feb 13 2024 *)
  • PARI
    a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; \\ Michel Marcus, Oct 11 2016
    
  • Sage
    [(2^n+3-7*(-1)^n+3*0^n)/6 for n in (0..40)] # G. C. Greubel, Sep 02 2019
    

Formula

G.f.: x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)).
E.g.f.: (exp(2*x) + 3*exp(x) - 7*exp(-x) + 3)/6.
From Paul Curtz, Dec 20 2020: (Start)
a(n) + (period 2 sequence: repeat [1, -2]) = A328284(n+2).
a(n+1) + (period 2 sequence: repeat [-2, 1]) = A001045(n).
a(n+1) + (period 2 sequence: repeat [-1, 0]) = A078008(n).
a(n+1) + (period 2 sequence : repeat [-3, 2]) = -(-1)^n*A084247(n).
a(n+4) = a(n+1) + 7*A001045(n).
a(n+4) + a(n+1) = A181565(n).
a(2*n+2) + a(2*n+3) = A087289(n) = 3*A007583(n).
a(2*n+1) = A163834(n), a(2*n+2) = A020988(n). (End)

Extensions

First part of definition corrected by Klaus Brockhaus, Dec 05 2009

A199116 a(n) = 6*4^n + 1.

Original entry on oeis.org

7, 25, 97, 385, 1537, 6145, 24577, 98305, 393217, 1572865, 6291457, 25165825, 100663297, 402653185, 1610612737, 6442450945, 25769803777, 103079215105, 412316860417, 1649267441665, 6597069766657, 26388279066625, 105553116266497, 422212465065985, 1688849860263937
Offset: 0

Views

Author

Vincenzo Librandi, Nov 04 2011

Keywords

Comments

Bisection (odd part) of A181565 and A201630. - Bruno Berselli, Dec 04 2011
First differences of A221130, a(n) = A221130(n+2) - A221130(n+1). - Jaroslav Krizek, Jan 02 2013

Crossrefs

Programs

  • Magma
    [6*4^n+1: n in [0..30]];
  • Mathematica
    6*4^Range[0,30]+1 (* or *) LinearRecurrence[{5,-4},{7,25},30] (* Harvey P. Dale, Apr 18 2024 *)

Formula

a(n) = 4*a(n-1) - 3.
a(n) = 5*a(n-1) - 4*a(n-2).
G.f.: (7-10*x)/((1-x)*(1-4*x)). - Bruno Berselli, Nov 04 2011
From Elmo R. Oliveira, May 08 2025: (Start)
E.g.f.: exp(x)*(6*exp(3*x) + 1).
a(n) = A140529(n) + 2. (End)

A199561 a(n) = 3*9^n + 1.

Original entry on oeis.org

4, 28, 244, 2188, 19684, 177148, 1594324, 14348908, 129140164, 1162261468, 10460353204, 94143178828, 847288609444, 7625597484988, 68630377364884, 617673396283948, 5559060566555524, 50031545098999708, 450283905890997364, 4052555153018976268, 36472996377170786404
Offset: 0

Views

Author

Vincenzo Librandi, Nov 08 2011

Keywords

Comments

An Engel expansion of 3 to the base 9 as defined in A181565, with the associated series expansion 3 = 9/4 + 9^2/(4*28) + 9^3/(4*28*244) + 9^4/(4*28*244*2188) + .... Cf. A087289 and A207262. - Peter Bala, Oct 29 2013

Crossrefs

Programs

  • Magma
    [3*9^n+1: n in [0..30]];
  • Mathematica
    3*9^Range[0,20]+1 (* or *) LinearRecurrence[{10,-9},{4,28},20] (* Harvey P. Dale, Jul 30 2019 *)

Formula

a(n) = 4*A066443(n).
a(n) = 9*a(n-1) - 8.
a(n) = 10*a(n-1) - 9*a(n-2).
G.f.: 4*(1-3*x)/((1-x)*(1-9*x)).
From Elmo R. Oliveira, Sep 13 2024: (Start)
E.g.f.: exp(x)*(3*exp(8*x) + 1).
a(n) = 2*A199560(n). (End)

A224195 Ordered sequence of numbers of form (2^n - 1)*2^m + 1 where n >= 1, m >= 1.

Original entry on oeis.org

3, 5, 7, 9, 13, 15, 17, 25, 29, 31, 33, 49, 57, 61, 63, 65, 97, 113, 121, 125, 127, 129, 193, 225, 241, 249, 253, 255, 257, 385, 449, 481, 497, 505, 509, 511, 513, 769, 897, 961, 993, 1009, 1017, 1021, 1023, 1025, 1537, 1793, 1921, 1985, 2017, 2033, 2041, 2045, 2047
Offset: 1

Views

Author

Brad Clardy, Apr 01 2013

Keywords

Comments

The table is constructed so that row labels are 2^n - 1, and column labels are 2^n. The body of the table is the row*col + 1. A MAGMA program is provided that generates the numbers in a table format. The sequence is read along the antidiagonals starting from the top left corner.
All of these numbers have the following property:
let m be a member of A(n),
if a sequence B(n) = all i such that i XOR (m - 1) = i - (m - 1), then
the differences between successive members of B(n) is a repeating series
of 1's with the last difference in the pattern m. The number of ones in
the pattern is 2^j - 1, where j is the column index.
As an example consider A(4) which is 9,
the sequence B(n) where i XOR 8 = i - 8 starts as:
8, 9, 10, 11, 12, 13, 14, 15, 24... (A115419)
with successive differences of:
1, 1, 1, 1, 1, 1, 1, 9.
The main diagonal is the 6th cyclotomic polynomial evaluated at powers of two (A020515).
The formula for diagonals above the main diagonal
2^(2*n+1) - 2^(n + (a+1)/2) + 1 n>=(a+1)/2 a=odd number above diagonal
2^(2*n) - 2^(n + (b/2)) + 1 n>=(b/2)+1 b=even number above diagonal
The formulas for diagonals below the main diagonal
2^(2*n+1) - 2^(n + 1 -(a+1)/2) + 1 n>=(a+1)/2 a=odd number below diagonal
2^(2*n) - 2^(n - (b/2)) + 1 n>=(b/2)+1 b=even number below diagonal
Primes of this sequence are in A152449.

Examples

			Using the lexicographic ordering of A057555 the sequence is:
A(n) = Table(i,j) with (i,j)=(1,1),(1,2),(2,1),(1,3),(2,2),(3,1)...
  +1  |    2    4     8    16    32     64    128    256     512    1024 ...
  ----|-----------------------------------------------------------------
  1   |    3    5     9    17    33     65    129    257     513    1025
  3   |    7   13    25    49    97    193    385    769    1537    3073
  7   |   15   29    57   113   225    449    897   1793    3585    7169
  15  |   31   61   121   241   481    961   1921   3841    7681   15361
  31  |   63  125   249   497   993   1985   3969   7937   15873   31745
  63  |  127  253   505  1009  2017   4033   8065  16129   32257   64513
  127 |  255  509  1017  2033  4065   8129  16257  32513   65025  130049
  255 |  511 1021  2041  4081  8161  16321  32641  65281  130561  261121
  511 | 1023 2045  4089  8177 16353  32705  65409 130817  261633  523265
  1023| 2047 4093  8185 16369 32737  65473 130945 261889  523777 1047553
  ...
		

Crossrefs

Cf. A081118, A152449 (primes), A057555 (lexicographic ordering), A115419 (example).
Rows: A000051(i=1), A181565(2), A083686(3), A195744(4), A206371(5), A196657(6).
Cols: A000225(j=1), A036563(2), A048490(3), A176303 (7 offset of 8).
Diagonals: A020515 (main), A092440, A060867 (above), A134169 (below).

Programs

  • Magma
    //program generates values in a table form
    for i:=1 to 10 do
        m:=2^i - 1;
        m,[ m*2^n +1 : n in [1..10]];
    end for;
    //program generates sequence in lexicographic ordering of A057555, read
    //along antidiagonals from top. Primes in the sequence are marked with *.
    for i:=2 to 18 do
        for j:=1 to i-1 do
           m:=2^j -1;
           k:=m*2^(i-j) + 1;
           if IsPrime(k) then k,"*";
              else k;
           end if;;
        end for;
    end for;
  • Mathematica
    Table[(2^j-1)*2^(i-j+1) + 1, {i, 10}, {j, i}] (* Paolo Xausa, Apr 02 2024 *)

Formula

a(n) = (2^(A057555(2*n-1)) - 1)*2^(A057555(2*n)) + 1 for n>=1. [corrected by Jason Yuen, Feb 22 2025]
a(n) = A081118(n)+2; a(n)=(2^i-1)*2^j+1, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Apr 04 2013

A340666 A(n,k) is derived from n by replacing each 0 in its binary representation with a string of k 0's; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 4, 3, 1, 0, 1, 8, 3, 4, 3, 0, 1, 16, 3, 16, 5, 3, 0, 1, 32, 3, 64, 9, 6, 7, 0, 1, 64, 3, 256, 17, 12, 7, 1, 0, 1, 128, 3, 1024, 33, 24, 7, 8, 3, 0, 1, 256, 3, 4096, 65, 48, 7, 64, 9, 3, 0, 1, 512, 3, 16384, 129, 96, 7, 512, 33, 10, 7
Offset: 0

Views

Author

Alois P. Heinz, Jan 15 2021

Keywords

Examples

			Square array A(n,k) begins:
  0, 0,  0,   0,    0,     0,      0,       0,        0, ...
  1, 1,  1,   1,    1,     1,      1,       1,        1, ...
  1, 2,  4,   8,   16,    32,     64,     128,      256, ...
  3, 3,  3,   3,    3,     3,      3,       3,        3, ...
  1, 4, 16,  64,  256,  1024,   4096,   16384,    65536, ...
  3, 5,  9,  17,   33,    65,    129,     257,      513, ...
  3, 6, 12,  24,   48,    96,    192,     384,      768, ...
  7, 7,  7,   7,    7,     7,      7,       7,        7, ...
  1, 8, 64, 512, 4096, 32768, 262144, 2097152, 16777216, ...
  ...
		

Crossrefs

Columns k=0-2, 4 give: A038573, A001477, A084471, A084473.
Rows n=0..17, 19 give: A000004, A000012, A000079, A010701, A000302, A000051(k+1), A007283, A010727, A001018, A087289, A007582(k+1), A062709(k+2), A164346, A181565(k+1), A005009, A181404(k+3), A001025, A199493, A253208(k+1).
Main diagonal gives A340667.

Programs

  • Maple
    A:= (n, k)-> Bits[Join](subs(0=[0$k][], Bits[Split](n))):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
    # second Maple program:
    A:= proc(n, k) option remember; `if`(n<2, n,
         `if`(irem(n, 2, 'r')=1, A(r, k)*2+1, A(r, k)*2^k))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    A[n_, k_] := FromDigits[IntegerDigits[n, 2] /. 0 -> Sequence @@ Table[0, {k}], 2];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 02 2021 *)

Formula

A000120(A(n,k)) = A000120(n) = log_2(A(n,0)+1).
A023416(A(n,k)) = k * A023416(n) for n >= 1.

A199115 a(n) = 5*4^n+1.

Original entry on oeis.org

6, 21, 81, 321, 1281, 5121, 20481, 81921, 327681, 1310721, 5242881, 20971521, 83886081, 335544321, 1342177281, 5368709121, 21474836481, 85899345921, 343597383681, 1374389534721, 5497558138881, 21990232555521, 87960930222081
Offset: 0

Views

Author

Vincenzo Librandi, Nov 04 2011

Keywords

Comments

An Engel expansion of 4/5 to the base 4 as defined in A181565, with the associated series expansion 4/5 = 4/6 + 4^2/(6*21) + 4^3/(6*21*81) + 4^4/(6*21*81*321) + ... . Cf. A136412 and A140660. - Peter Bala, Oct 29 2013

Crossrefs

Programs

  • Magma
    [5*4^n+1: n in [0..30]];
  • Mathematica
    5*4^Range[0,30]+1 (* or  *) LinearRecurrence[{5,-4},{6,21},30] (* Harvey P. Dale, Oct 19 2024 *)

Formula

a(n) = 3*A136412(n).
a(n) = 4*a(n-1)-3.
a(n) = 5*a(n-1)-4*a(n-2).
G.f.: 3*(2-3*x)/((1-x)*(1-4*x)). - Bruno Berselli, Nov 04 2011

A199493 a(n) = 2*8^n+1.

Original entry on oeis.org

3, 17, 129, 1025, 8193, 65537, 524289, 4194305, 33554433, 268435457, 2147483649, 17179869185, 137438953473, 1099511627777, 8796093022209, 70368744177665, 562949953421313, 4503599627370497, 36028797018963969
Offset: 0

Views

Author

Vincenzo Librandi, Nov 07 2011

Keywords

Comments

An Engel expansion of 4 to the base 8 as defined in A181565, with the associated series expansion 4 = 8/3 + 8^2/(3*17) + 8^3/(3*17*129) + 8^4/(3*17*129*1025) + .... Cf. A087289 and A199552. - Peter Bala, Oct 30 2013

Crossrefs

Programs

  • Magma
    [2*8^n+1: n in [0..30]];
  • Mathematica
    2*8^Range[0, 20] + 1 (* Wesley Ivan Hurt, Jul 23 2025 *)

Formula

a(n) = 8*a(n-1)-7.
a(n) = 9*a(n-1)-8*a(n-2).
G.f.: (3-10*x)/((1-x)*(1-8*x)).

A199552 4*8^n+1.

Original entry on oeis.org

5, 33, 257, 2049, 16385, 131073, 1048577, 8388609, 67108865, 536870913, 4294967297, 34359738369, 274877906945, 2199023255553, 17592186044417, 140737488355329, 1125899906842625, 9007199254740993, 72057594037927937
Offset: 0

Views

Author

Vincenzo Librandi, Nov 08 2011

Keywords

Comments

An Engel expansion of 2 to the base 8 as defined in A181565, with the associated series expansion 2 = 8/5 + 8^2/(5*33) + 8^3/(5*33*257) + 8^4/(5*33*257*2049) + .... Cf. A087289 and A199493. - Peter Bala, Oct 29 2013

Crossrefs

Programs

  • Magma
    [4*8^n+1: n in [0..30]];
  • Mathematica
    4*8^Range[0,20]+1 (* or *) LinearRecurrence[{9,-8},{5,33},20] (* Harvey P. Dale, Mar 18 2018 *)

Formula

a(n) = 8*a(n-1)-7.
a(n) = 9*a(n-1)-8*a(n-2).
G.f.: (5-12*x)/((1-x)*(1-8*x)).

A206373 a(n) = (14*4^n + 1)/3.

Original entry on oeis.org

5, 19, 75, 299, 1195, 4779, 19115, 76459, 305835, 1223339, 4893355, 19573419, 78293675, 313174699, 1252698795, 5010795179, 20043180715, 80172722859, 320690891435, 1282763565739, 5131054262955, 20524217051819, 82096868207275, 328387472829099, 1313549891316395
Offset: 0

Views

Author

Brad Clardy, Feb 07 2012

Keywords

Comments

A generalized Engel expansion of 2/7 to the base b := 4/3 as defined in A181565 with associated series expansion 2/7 = b/5 + b^2/(5*19) + b^3/(5*19*75) + b^4/(5*19*75*299) + .... - Peter Bala, Oct 30 2013

Crossrefs

Sequences of the form (m*4^n + 1)/3: A007583 (m=2), A136412 (m=5), A199210 (m=11), A199210 (m=11), this sequence (m=14).
Cf. A181565.

Programs

  • Magma
    [(14*4^n+1)/3 : n in [0..30]];
    
  • Mathematica
    (14*4^Range[0,30]+1)/3 (* or *) LinearRecurrence[{5,-4},{5,19},30] (* Harvey P. Dale, Jan 13 2023 *)
  • PARI
    a(n)=(14*4^n + 1)/3 \\ Charles R Greathouse IV, Jun 01 2015
    
  • SageMath
    [(7*2^(2*n+1)+1)/3 for n in range(31)] # G. C. Greubel, Jan 19 2023

Formula

a(n) = (14*4^n + 1)/3.
From Peter Bala, Oct 30 2013: (Start)
a(n+1) = 4*a(n) - 1 with a(0) = 5.
a(n) = 5*a(n-1) - 4*a(n-2) with a(0) = 5 and a(1) = 19.
O.g.f. (5 - 6*x)/((1 - x)*(1 - 4*x)). (End)
E.g.f.: (1/3)*(14*exp(4*x) + exp(x)). - G. C. Greubel, Jan 19 2023
Previous Showing 21-30 of 39 results. Next