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

A274496 Triangle read by rows: T(n,k) is the number of binary words of length n having degree of asymmetry equal to k (n >= 0; 0 <= k <= n/2).

Original entry on oeis.org

1, 2, 2, 2, 4, 4, 4, 8, 4, 8, 16, 8, 8, 24, 24, 8, 16, 48, 48, 16, 16, 64, 96, 64, 16, 32, 128, 192, 128, 32, 32, 160, 320, 320, 160, 32, 64, 320, 640, 640, 320, 64, 64, 384, 960, 1280, 960, 384, 64, 128, 768, 1920, 2560, 1920, 768, 128
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.
Sum_{k>=0} k*T(n,k) = A274497(n).

Examples

			From _Andrew Howroyd_, Jan 10 2018: (Start)
Triangle begins:
   1;
   2;
   2,   2;
   4,   4;
   4,   8,   4;
   8,  16,   8;
   8,  24,  24,   8;
  16,  48,  48,  16;
  16,  64,  96,  64,  16;
  32, 128, 192, 128,  32;
  32, 160, 320, 320, 160, 32;
  ...
(End)
T(4,0) = 4 because we have 0000, 0110, 1001, and 1111.
T(4,1) = 8 because we have 0001, 0010, 0100, 1000, 0111, 1011, 1101, and 1110.
T(4,2) = 4 because we have 0011, 0101, 1010, and 1100.
		

Crossrefs

Programs

  • Maple
    T := proc(n, k) options operator, arrow: 2^ceil((1/2)*n)*binomial(floor((1/2)*n), k) end proc: for n from 0 to 15 do seq(T(n, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form
  • Mathematica
    Table[2^Ceiling[n/2] Binomial[Floor[n/2], k], {n, 0, 13}, {k, 0, n/2}] // Flatten (* Michael De Vlieger, Jan 11 2018 *)
  • PARI
    T(n,k) = 2^ceil(n/2)*binomial(floor(n/2), k);
    for(n=0, 10, for(k=0, n\2, print1(T(n, k), ", ")); print); \\ Andrew Howroyd, Jan 10 2018

Formula

T(n,k) = 2^ceiling(n/2)*binomial(floor(n/2),k).
G.f.: G(t,z) = (1 + 2z)/(1 - 2(1 + t)z^2).
The row generating polynomials P[n] satisfy P[n] = 2(1 + t)P[n-2] (n >= 2). Easy to see if we note that the binary words of length n (n >= 2) are 0w0, 0w1, 1w0, and 1w1, where w is a binary word of length n-2.

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)

A274499 Sum of the degrees of asymmetry of all ternary words of length n.

Original entry on oeis.org

0, 0, 6, 18, 108, 324, 1458, 4374, 17496, 52488, 196830, 590490, 2125764, 6377292, 22320522, 66961566, 229582512, 688747536, 2324522934, 6973568802, 23245229340, 69735688020, 230127770466, 690383311398, 2259436291848, 6778308875544, 22029503845518, 66088511536554
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(2) = 6 because the ternary words 00, 01, 02, 10, 11, 12, 20, 21, 22 have degrees of asymmetry 0, 1, 1, 1, 0, 1, 1, 1, 0, respectively.
		

Crossrefs

Programs

  • Maple
    a := proc (n) options operator, arrow: (1/6)*(2*n-1+(-1)^n)*3^n end proc: seq(a(n), n = 0 .. 30);
  • Mathematica
    LinearRecurrence[{3, 9, -27}, {0, 0, 6}, 28] (* Jean-François Alcover, Sep 09 2024 *)

Formula

a(n) = (1/6)*(2n - 1 + (-1)^n)*3^n.
a(n) = Sum(k*A274498(n,k), k>=0).
From Chai Wah Wu, Dec 27 2018: (Start)
a(n) = 3*a(n-1) + 9*a(n-2) - 27*a(n-3) for n > 2.
G.f.: 6*x^2/((3*x - 1)^2*(3*x + 1)). (End)
Showing 1-3 of 3 results.