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 31-40 of 41 results. Next

A105851 Binomial transform triangle, read by rows.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 8, 4, 1, 16, 20, 12, 5, 1, 32, 48, 32, 16, 6, 1, 64, 112, 80, 44, 20, 7, 1, 128, 256, 192, 112, 56, 24, 8, 1, 256, 576, 448, 272, 144, 68, 28, 9, 1, 512, 1280, 1024, 640, 352, 176, 80, 32, 10, 1, 1024, 2816, 2304, 1472, 832, 432, 208, 92, 36, 11, 1
Offset: 0

Views

Author

Gary W. Adamson, Apr 23 2005

Keywords

Comments

Let P = Pascal's triangle as an infinite lower triangular matrix and A is the infinite array of arithmetic sequences as shown in A077028:
1, 1, 1, 1, 1, ...
1, 2, 3, 4, 5, ...
1, 3, 5, 7, 9, ...
1, 4, 7, 10, 13, ...
1, 5, 9, 13, 17, ...
Perform the operation P * A, getting a new array with each column being the binomial transform of an arithmetic sequence. Take antidiagonals of the new array, then by rows = the triangle of A105851.

Examples

			Column 3: 1, 5, 16, 44, 112, ... (A053220) is the binomial transform of 3k+1 (A016777: 1, 4, 7, ...).
Triangle begins:
     1;
     2,    1;
     4,    3,    1;
     8,    8,    4,    1;
    16,   20,   12,    5,   1;
    32,   48,   32,   16,   6,   1;
    64,  112,   80,   44,  20,   7,   1;
   128,  256,  192,  112,  56,  24,   8,  1;
   256,  576,  448,  272, 144,  68,  28,  9,  1;
   512, 1280, 1024,  640, 352, 176,  80, 32, 10,  1;
  1024, 2816, 2304, 1472, 832, 432, 208, 92, 36, 11, 1;
  ...
		

Crossrefs

Programs

  • Magma
    /* As triangle */ [[(2+k*(n-k))*2^(n-k-1): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jul 26 2015
  • Maple
    seq(seq((2 + k*(n - k))*2^(n-k-1),k=0..n),n=0..10); # Peter Bala, Jul 26 2015
  • Mathematica
    t[n_, k_]:=(2 + k (n - k)) 2^(n - k - 1); Table[t[n - 1, k - 1], {n, 10}, {k, n}]//Flatten (* Vincenzo Librandi, Jul 26 2015 *)

Formula

n-th column of the triangle is the binomial transform of the arithmetic sequence (n*k + 1), (k = 0, 1, 2, ...).
From Peter Bala, Jul 26 2015: (Start)
T(n,k) = (2 + k*(n - k))*2^(n-k-1) for 0 <= k <= n.
O.g.f.: (1 - x*(2 + t) + 3*t*x^2)/((1 - 2*x)^2*(1 - t*x)^2) = 1 + (2 + t)*x + (4 + 3*t + t^2)*x^2 + ....
k-th column g.f.: (1 + (k - 2)*x)/(1 - 2*x)^2. Cf. A077028. (End)

Extensions

More terms from Philippe Deléham, Mar 31 2007

A126063 Triangle read by rows: see A128196 for definition.

Original entry on oeis.org

1, 1, 2, 3, 6, 4, 15, 30, 20, 8, 105, 210, 140, 56, 16, 945, 1890, 1260, 504, 144, 32, 10395, 20790, 13860, 5544, 1584, 352, 64, 135135, 270270, 180180, 72072, 20592, 4576, 832, 128, 2027025, 4054050, 2702700, 1081080, 308880, 68640, 12480, 1920, 256
Offset: 0

Views

Author

N. J. A. Sloane, Feb 28 2007

Keywords

Examples

			Triangle begins:
       1
       1,       2
       3,       6,       4
      15,      30,      20,       8
     105,     210,     140,      56,     16
     945,    1890,    1260,     504,    144,    32
   10395,   20790,   13860,    5544,   1584,   352,    64
  135135,  270270,  180180,   72072,  20592,  4576,   832,  128
		

Crossrefs

First column is A001147, second column is A097801.
The diagonal is A000079, the subdiagonal is A014480.

Programs

  • Maple
    A126063 := (n,k) -> 2^k*doublefactorial(2*n-1)/ doublefactorial(2*k-1); seq(print(seq(A126063(n,k),k=0..n)),n=0..7); # Peter Luschny, Dec 20 2012
  • Mathematica
    Flatten[Table[2^k (2n - 1)!!/(2k - 1)!!, {n, 0, 8}, {k, 0, n}]] (* Ivan Neretin, May 11 2015 *)

Formula

Let H be the diagonal matrix diag(1,2,4,8,...) and
let G be the matrix (n!! defined as A001147(n), -1!! = 1):
(-1)!!/(-1)!!
1!!/(-1)!! 1!!/1!!
3!!/(-1)!! 3!!/1!! 3!!/3!!
5!!/(-1)!! 5!!/1!! 5!!/3!! 5!!/5!!
...
Then T = G*H. [Gottfried Helms]
T(n,k) = 2^k*(2n - 1)!!/(2k - 1)!!. - Ivan Neretin, May 13 2015

A204203 Triangle based on (0,1/4,1) averaging array.

Original entry on oeis.org

1, 1, 5, 1, 6, 13, 1, 7, 19, 29, 1, 8, 26, 48, 61, 1, 9, 34, 74, 109, 125, 1, 10, 43, 108, 183, 234, 253, 1, 11, 53, 151, 291, 417, 487, 509, 1, 12, 64, 204, 442, 708, 904, 996, 1021, 1, 13, 76, 268, 646, 1150, 1612, 1900, 2017, 2045, 1, 14, 89, 344, 914
Offset: 1

Views

Author

Clark Kimberling, Jan 12 2012

Keywords

Comments

See A204201 for a discussion and guide to other averaging arrays.

Examples

			First six rows:
1
1...5
1...6...13
1...7...19...29
1...8...26...48...61
1...9...34...74...109...125
		

Crossrefs

Cf. A204201.

Programs

  • Mathematica
    a = 0; r = 1/4; b = 1;  t[1, 1] = r;
    t[n_, 1] := (a + t[n - 1, 1])/2;
    t[n_, n_] := (b + t[n - 1, n - 1])/2;
    t[n_, k_] := (t[n - 1, k - 1] + t[n - 1, k])/2;
    u[n_] := Table[t[n, k], {k, 1, n}]
    Table[u[n], {n, 1, 5}]    (* averaging array *)
    u = Table[(1/2) (1/r) 2^n*u[n], {n, 1, 12}];
    TableForm[u]  (* A204203 triangle *)
    Flatten[u]    (* A204203 sequence *)

Formula

From Philippe Deléham, Dec 24 2013: (Start)
T(n,n) = A036563(n+1).
Sum_{k=1..n} T(n,k) = A014480(n-1).
T(n,k) = T(n-1,k)+3*T(n-1,k-1)-2*T(n-2,k-1)-2*T(n-2,k-2), T(1,1)=1, T(2,1)=1, T(2,2)=5, T(n,k)=0 if k<1 or if k>n. (End)

A257791 Rectangular array A read by upward antidiagonals in which the entry in row n and column k is defined by A(n,k) = 2^(n+1)*(2*k - 1), n,k >= 1.

Original entry on oeis.org

4, 8, 12, 16, 24, 20, 32, 48, 40, 28, 64, 96, 80, 56, 36, 128, 192, 160, 112, 72, 44, 256, 384, 320, 224, 144, 88, 52, 512, 768, 640, 448, 288, 176, 104, 60, 1024, 1536, 1280, 896, 576, 352, 208, 120, 68, 2048, 3072, 2560, 1792, 1152, 704, 416, 240, 136, 76
Offset: 1

Views

Author

L. Edson Jeffery, May 08 2015

Keywords

Comments

Lemma: The sequence is a permutation of A008586\{0} = {4*m : m = 1,2,...}.
Proof: Write A(n,k)/4 = A054582(n-1,k-1). The sequence A054582 is known to be a permutation of the natural numbers, and the result follows. QED

Examples

			Array A begins:
.       4    12     20     28     36     44     52     60     68     76
.       8    24     40     56     72     88    104    120    136    152
.      16    48     80    112    144    176    208    240    272    304
.      32    96    160    224    288    352    416    480    544    608
.      64   192    320    448    576    704    832    960   1088   1216
.     128   384    640    896   1152   1408   1664   1920   2176   2432
.     256   768   1280   1792   2304   2816   3328   3840   4352   4864
.     512  1536   2560   3584   4608   5632   6656   7680   8704   9728
.    1024  3072   5120   7168   9216  11264  13312  15360  17408  19456
.    2048  6144  10240  14336  18432  22528  26624  30720  34816  38912
		

Crossrefs

Cf. A000079 (powers of 2), A005408 (odd numbers), A008586 (multiples of 4), A014480, A054582.
Cf. A257499.

Programs

  • Mathematica
    (* Array: *)
    A257791[n_, k_] := 2^(n + 1)*(2*k - 1); Grid[Table[A257791[n, k], {n, 10}, {k, 10}]]
    (* Array antidiagonals flattened: *)
    Flatten[Table[2^(n - k + 2)*(2*k - 1), {n, 10}, {k, n}]]

Formula

A(n,n) = 4*A014480(n-1).

A339771 a(n) = Sum_{i=0..n} Sum_{j=0..n} 2^max(i,j).

Original entry on oeis.org

1, 7, 27, 83, 227, 579, 1411, 3331, 7683, 17411, 38915, 86019, 188419, 409603, 884739, 1900547, 4063235, 8650755, 18350083, 38797315, 81788931, 171966467, 360710147, 754974723, 1577058307, 3288334339, 6845104131, 14227079171, 29527900163, 61203283971
Offset: 0

Views

Author

Bernard Schott, Dec 16 2020

Keywords

Examples

			a(3) = 5*2^4 + 3 = 83.
		

References

  • Eric Billault, Walter Damin, Robert Ferréol, Rodolphe Garin, MPSI Classes Prépas - Khôlles de Maths, Exercices corrigés, Ellipses, 2012, exercice 2.22 (2), pp. 26, 43-44.

Crossrefs

Cf. A142964 (with min instead of max).
Partial sums of A014480.

Programs

  • Maple
    seq((2*n-1)*2^(n+1)+3,n=0..40);
  • Mathematica
    Table[(2*n - 1)*2^(n + 1) + 3, {n, 0, 29}] (* Amiram Eldar, Dec 16 2020 *)
  • PARI
    a(n) = sum(i=0, n, sum(j=0, n, 2^max(i,j))); \\ Michel Marcus, Dec 16 2020
    
  • Python
    def A339771():
        a, b, c = 1, 7, 27
        yield(a); yield(b)
        while True:
            yield c
            z = 4*a - 8*b + 5*c
            a, b, c = b, c, z
    a = A339771()
    print([next(a) for  in range(30)]) # _Peter Luschny, Dec 17 2020

Formula

a(n) = (2*n-1) * 2^(n+1) + 3.
G.f.: -(2*x+1)/((x-1)*(2*x-1)^2). - Alois P. Heinz, Dec 16 2020
E.g.f: 3*exp(x) + 2*exp(2*x)*(4*x - 1). - Stefano Spezia, Dec 16 2020
a(n) = 2*A066524(n+1) - A142964(n). - Kevin Ryde, Dec 17 2020
a(n) = (2*A027981(n)+1)/3 for n >= 1. - Hugo Pfoertner, Dec 17 2020

A132775 A007818 * A132774.

Original entry on oeis.org

1, 3, 3, 5, 10, 5, 7, 21, 21, 7, 9, 36, 54, 36, 9, 11, 55, 110, 110, 55, 11, 13, 78, 195, 260, 195, 78, 13, 15, 105, 315, 525, 525, 315, 105, 15, 17, 136, 476, 952, 1190, 952, 476, 136, 17, 19, 171, 684, 1596, 2394, 2394, 1596, 684, 171, 19
Offset: 0

Views

Author

Gary W. Adamson, Aug 29 2007

Keywords

Comments

Row sums = A014480: (1, 6, 20, 56, 144, 352, 832, ...).

Examples

			First few rows of the triangle:
   1;
   3,   3;
   5,  10,   5;
   7,  21,  21,   7;
   9,  36,  54,  36,   9;
  11,  55, 110, 110,  55,  11;
  13,  78, 195, 260, 195,  78,  13;
  15, 105, 315, 525, 525, 315, 105, 15;
  ...
Row 3 = (7, 21, 21, 7) = 7 * (1, 3, 3, 1).
		

Crossrefs

Formula

Binomial transform of A132774. T(n,k) = (2n+1) * A007318(n,k).

A134233 (A007318 * A134082 + A134082 * A007318) - A007318 as infinite lower triangular matrices.

Original entry on oeis.org

1, 5, 1, 9, 10, 1, 13, 27, 15, 1, 17, 52, 54, 20, 1, 21, 85, 130, 90, 25, 25, 126, 255, 260, 135, 30, 1, 29, 175, 441, 595, 455, 189, 35, 33, 232, 700, 1176, 1190, 728, 252, 40, 1, 37, 297, 1044, 2100, 2646, 2142, 1092, 324, 45, 1
Offset: 0

Views

Author

Gary W. Adamson, Oct 14 2007

Keywords

Comments

Row sums = A014480: (1, 6, 20, 56, 144, 352, ...).
Also 2*A134083-A007318 as infinite lower triangular matrices. - Philippe Deléham, Oct 15 2007

Examples

			First few rows of the triangle:
   1;
   5,   1;
   9,  10,   1;
  13,  27,  15,   1;
  17,  52,  54,  20,   1;
  21,  85, 130,  90,  25,   1;
  ...
		

Crossrefs

A185342 Triangle of successive recurrences in columns of A117317(n).

Original entry on oeis.org

2, 4, -4, 6, -12, 8, 8, -24, 32, -16, 10, -40, 80, -80, 32, 12, -60, 160, -240, 192, -64, 14, -84, 280, -560, 672, -448, 128, 16, -112, 448, -1120, 1792, -1792, 1024, -256, 18, -144, 672, -2016, 4032, -5376, 4608, -2304, 512, 20, -180, 960, -3360, 8064
Offset: 0

Views

Author

Paul Curtz, Jan 26 2012

Keywords

Comments

A117317 (A):
1
2 1
4 5 1
8 16 9 1
16 44 41 14 1
32 112 146 85 20 1
64 272 456 377 155 27 1
have for their columns successive signatures
(2) (4,-4) (6,-12,8) (8,-24, 32, -16) (10,-40,80,-80,32) i.e. a(n).
Take based on abs(A133156) (B):
1
2 0
4 1 0
8 4 0 0
16 12 1 0 0
32 32 6 0 0 0
64 80 24 1 0 0 0.
The recurrences of successive columns are also a(n). a(n) columns: A005843(n+1), A046092(n+1), A130809, A130810, A130811, A130812, A130813.

Examples

			Triangle T(n,k),for 1<=k<=n, begins :
2                                         (1)
4    -4                                   (2)
6   -12   8                               (3)
8   -24  32   -16                         (4)
10  -40  80   -80   32                    (5)
12  -60 160  -240  192   -64              (6)
14  -84 280  -560  672  -448  128         (7)
16 -112 448 -1120 1792 -1792 1024 -256    (8)
Successive rows can be divided by A171977.
		

Crossrefs

Cf. For (A): A053220, A056243. For (B): A000079, A001787, A001788, A001789. For A193862: A115068 (a Coxeter group). For (2): A014480 (also (3),(4),(5),..); also A053220 and A001787.
Cf. A007318.

Programs

  • Mathematica
    Table[(-1)*Binomial[n, k]*(-2)^k, {n, 1, 20}, {k, 1, n}] // Flatten (* G. C. Greubel, Jun 27 2017 *)
  • PARI
    for(n=1,20, for(k=1,n, print1((-2)^(k+1)*binomial(n,k)/2, ", "))) \\ G. C. Greubel, Jun 27 2017

Formula

Take A133156(n) without 1's or -1's double triangle (C)=
2
4
8 -4
16 -12
32 -32 6
64 -80 24
128 -192 80 -8
256 -448 240 -40
512 -1024 672 -160 10;
a(n) is increasing odd diagonals and increasing (sign changed) even diagonals. Rows sum of (C) = A201629 (?) Another link between Chebyshev polynomials and cos( ).
Absolute values: A013609(n) without 1's. Also 2*A193862 = (2*A002260)*A135278.
T(n,k) = T(n-1,k) - 2*T(n-1,k-1) for k>1, T(n,1) = 2*n = 2*T(n-1,1) - T(n-2,1). - Philippe Deléham, Feb 11 2012
T(n,k) = (-1)* Binomial(n,k)*(-2)^k, 1<=k<=n. - Philippe Deléham, Feb 11 2012

A261349 T(n,k) is the decimal equivalent of a code for k that maximizes the sum of the Hamming distances between (cyclical) adjacent code words; triangle T(n,k), n>=0, 0<=k<=2^n-1, read by rows.

Original entry on oeis.org

0, 0, 1, 0, 3, 1, 2, 0, 7, 1, 6, 3, 4, 2, 5, 0, 15, 1, 14, 3, 12, 2, 13, 6, 9, 7, 8, 5, 10, 4, 11, 0, 31, 1, 30, 3, 28, 2, 29, 6, 25, 7, 24, 5, 26, 4, 27, 12, 19, 13, 18, 15, 16, 14, 17, 10, 21, 11, 20, 9, 22, 8, 23, 0, 63, 1, 62, 3, 60, 2, 61, 6, 57, 7, 56, 5
Offset: 0

Views

Author

Alois P. Heinz, Nov 18 2015

Keywords

Comments

This code might be called "Anti-Gray code".
The sum of the Hamming distances between (cyclical) adjacent code words of row n gives 0, 2, 6, 20, 56, 144, 352, ... = A014480(n-1) for n>1.

Examples

			Triangle T(n,k) begins:
  0;
  0,  1;
  0,  3, 1,  2;
  0,  7, 1,  6, 3,  4, 2,  5;
  0, 15, 1, 14, 3, 12, 2, 13, 6,  9, 7,  8, 5, 10, 4, 11;
  0, 31, 1, 30, 3, 28, 2, 29, 6, 25, 7, 24, 5, 26, 4, 27, 12, 19, ... ;
  0, 63, 1, 62, 3, 60, 2, 61, 6, 57, 7, 56, 5, 58, 4, 59, 12, 51, ... ;
		

Crossrefs

Columns k=0-3 give: A000004, A000225, A000012 (for n>1), A000918 (for n>1).
Row lengths give A000079.
Row sums give A006516.

Programs

  • Maple
    g:= n-> Bits[Xor](n, iquo(n, 2)):
    T:= (n, k)-> (t-> `if`(m=0, t, 2^n-1-t))(g(iquo(k, 2, 'm'))):
    seq(seq(T(n, k), k=0..2^n-1), n=0..6);

Formula

T(n,k) = A003188(k/2) if k even, T(n,k) = 2^n-1-A003188((k-1)/2) else.
A101080(T(n,2k),T(n,2k+1)) = n, A101080(T(n,2k),T(n,2k-1)) = n-1.
T(n,2^n-1) = A083329(n-1) for n>0.
T(n,2^n-2) = A000079(n-2) for n>1.
T(2n,2n) = A003188(n).
T(2n+1,2n+1) = 2*4^n - 1 - A003188(n) = A083420(n) - A003188(n).

A264735 a(n) = prime(2^(n-1)*(2*n-1)), n >= 1.

Original entry on oeis.org

2, 13, 71, 263, 827, 2377, 6379, 16603, 41611, 101573, 243473, 573637, 1333613, 3065983, 6975971, 15746347, 35277211, 78510373, 173717329, 382404863, 837870343, 1828047503, 3973066781, 8604768101, 18576139177, 39983413319
Offset: 1

Views

Author

L. Edson Jeffery, Nov 22 2015

Keywords

Crossrefs

Cf. A000040, A014480, A264731 (main diagonal).

Programs

Formula

a(n) = A000040(2^(n-1)*(2*n-1)).
a(n) = A000040(A014480(n-1)). - Michel Marcus, Nov 23 2015
Previous Showing 31-40 of 41 results. Next