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-5 of 5 results.

A327549 Number T(n,k) of compositions of partitions of n with exactly k compositions; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 4, 2, 1, 0, 8, 8, 2, 1, 0, 16, 16, 8, 2, 1, 0, 32, 48, 24, 8, 2, 1, 0, 64, 96, 64, 24, 8, 2, 1, 0, 128, 256, 160, 80, 24, 8, 2, 1, 0, 256, 512, 448, 192, 80, 24, 8, 2, 1, 0, 512, 1280, 1024, 576, 224, 80, 24, 8, 2, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 16 2019

Keywords

Examples

			T(3,1) = 4: 3, 21, 12, 111.
T(3,2) = 2: 2|1, 11|1.
T(3,3) = 1: 1|1|1.
Triangle T(n,k) begins:
  1;
  0,   1;
  0,   2,    1;
  0,   4,    2,    1;
  0,   8,    8,    2,   1;
  0,  16,   16,    8,   2,   1;
  0,  32,   48,   24,   8,   2,  1;
  0,  64,   96,   64,  24,   8,  2,  1;
  0, 128,  256,  160,  80,  24,  8,  2, 1;
  0, 256,  512,  448, 192,  80, 24,  8, 2, 1;
  0, 512, 1280, 1024, 576, 224, 80, 24, 8, 2, 1;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A011782 (for n>0), A134353(n-2) (for n>1).
Row sums give A075900.
T(2n,n) gives A327550.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+expand(2^(i-1)*x*b(n-i, min(n-i, i)))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + 2^(i-1) x b[n-i, Min[n-i, i]]]];
    T[n_] := CoefficientList[b[n, n], x];
    T /@ Range[0, 12] // Flatten (* Jean-François Alcover, Dec 17 2020, after Alois P. Heinz *)

Formula

Sum_{k=1..n} k * T(n,k) = A327548(n).

A274497 Sum of the degrees of asymmetry of all binary words of length n.

Original entry on oeis.org

0, 0, 2, 4, 16, 32, 96, 192, 512, 1024, 2560, 5120, 12288, 24576, 57344, 114688, 262144, 524288, 1179648, 2359296, 5242880, 10485760, 23068672, 46137344, 100663296, 201326592, 436207616, 872415232, 1879048192, 3758096384, 8053063680
Offset: 0

Views

Author

Emeric Deutsch, Jul 27 2016

Keywords

Comments

The degree of asymmetry of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the degree of asymmetry of (2,7,6,4,5,7,3) is 2, counting the pairs (2,3) and (6,5).
A sequence is palindromic if and only if its degree of asymmetry is 0.

Examples

			a(3) = 4 because the binary words 000, 001, 010, 100, 011, 101, 110, 111 have degrees of asymmetry 0, 1, 0, 1, 1, 0, 1, 0, respectively.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) options operator, arrow: (1/8)*(2*n-1+(-1)^n)*2^n end proc: seq(a(n), n = 0 .. 30);
  • Mathematica
    LinearRecurrence[{2, 4, -8}, {0, 0, 2}, 31] (* Jean-François Alcover, Nov 16 2022 *)
  • PARI
    a(n)=(2*n-1+(-1)^n)*2^n/8 \\ Charles R Greathouse IV, Jul 08 2024

Formula

a(n) = (1/8)*(2n - 1 + (-1)^n)*2^n.
a(n) = Sum_{k>=0} k*A274496(n,k).
From Alois P. Heinz, Jul 27 2016: (Start)
a(n) = 2^(n-1) * A004526(n) = 2^(n-1)*floor(n/2).
a(n) = 2 * A134353(n-2) for n>=2. (End)
From Chai Wah Wu, Dec 27 2018: (Start)
a(n) = 2*a(n-1) + 4*a(n-2) - 8*a(n-3) for n > 2.
G.f.: 2*x^2/((2*x - 1)^2*(2*x + 1)). (End)

A134352 A130123 * A128174.

Original entry on oeis.org

1, 0, 2, 4, 0, 4, 0, 8, 0, 8, 16, 0, 16, 0, 16, 0, 32, 0, 32, 0, 32, 64, 0, 64, 0, 64, 0, 64, 0, 128, 0, 128, 0, 128, 0, 128, 256, 0, 256, 0, 256, 0, 256, 0, 256, 0, 512, 0, 512, 0, 512, 0, 512, 0, 512
Offset: 0

Views

Author

Gary W. Adamson, Oct 21 2007

Keywords

Comments

Row sums = A134353.

Examples

			First few rows of the triangle:
   1;
   0,  2;
   4,  0,  4;
   0,  8,  0,  8;
  16,  0, 16,  0, 16;
   0, 32,  0, 32,  0, 32;
  ...
		

Crossrefs

Formula

A130123 * A128174 as infinite lower triangular matrices.
Triangle read by rows: even n-th row = n+1 terms of (2^n, 0, 2^n, ...); odd n-th row = n+1 terms of (0, 2^n, 0, 2^n, ...).

A140787 Expansion of 1 / ( (1+x)*(2*x+1)*(-1+2*x)^2 ).

Original entry on oeis.org

1, 1, 7, 9, 39, 57, 199, 313, 967, 1593, 4551, 7737, 20935, 36409, 94663, 167481, 422343, 757305, 1864135, 3378745, 8155591, 14913081, 35418567, 65244729, 152859079, 283348537, 656175559, 1222872633, 2803659207, 5249404473
Offset: 0

Views

Author

Paul Curtz, Jul 14 2008

Keywords

Crossrefs

Programs

  • Magma
    [2^n*(n/3+11/18) + (-1)^n* (2^(n-1)-1/9): n in [0..40]]; // Vincenzo Librandi, Aug 08 2011
  • Mathematica
    max = 40; j[n_] := (2^n-(-1)^n)/3; jj = Table[{j[n], -j[n]}, {n, 0, max+2, 2}] // Flatten; a[0] = 1; a[n_] := a[n] = 2*a[n-1] + jj[[n+3]]; Table[a[n], {n, 0, max}] (* Jean-François Alcover, Sep 30 2013 *)

Formula

a(n) = 2^n*(n/3 + 11/18) + (-1)^n* (2^(n-1) - 1/9).
a(2n) - 2a(2n-1) = A002450(n+1).
a(n) + a(n+1) = A134353(n+1). - R. J. Mathar, Nov 10 2013

Extensions

Better name from R. J. Mathar, Jul 02 2011
Edited by Ralf Stephan, Nov 10 2013

A368043 Triangle read by rows: T(n, k) = 2^(n + k).

Original entry on oeis.org

1, 2, 4, 4, 8, 16, 8, 16, 32, 64, 16, 32, 64, 128, 256, 32, 64, 128, 256, 512, 1024, 64, 128, 256, 512, 1024, 2048, 4096, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144
Offset: 0

Views

Author

Peter Luschny, Dec 09 2023

Keywords

Examples

			[0]  [  1]
[1]  [  2,   4]
[2]  [  4,   8,  16]
[3]  [  8,  16,  32,    64]
[4]  [ 16,  32,  64,   128,  256]
[5]  [ 32,  64,  128,  256,  512, 1024]
[6]  [ 64, 128,  256,  512, 1024, 2048,  4096]
[7]  [128, 256,  512, 1024, 2048, 4096,  8192, 16384]
[8]  [256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536]
		

Crossrefs

Cf. A000079 (T(n,0)), A004171 (T(n,n-1)), A000302 (T(n,n)), A171476 (row sums), A003683 (alternating row sums), A134353 (antidiagonal sums), A001018 (T(2n, n)), A094014 (T(n, n/2)), A002697.

Programs

  • Mathematica
    Array[2^Range[#,2#]&,10,0] (* Paolo Xausa, Dec 09 2023 *)
  • Python
    from functools import cache
    @cache
    def T_row(n: int) -> list[int]:
        if n == 0: return [1]
        row = T_row(n - 1) + [0]
        for k in range(n): row[k] *= 2
        row[n] = row[n - 1] * 2
        return row
    for n in range(11): print(T_row(n))

Formula

G.f.: 1/((1 - 2*x)*(1 - 4*x*y)). - Stefano Spezia, Dec 09 2023
Showing 1-5 of 5 results.