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.

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

This page as a plain text file.
%I A275437 #22 Jan 04 2019 07:13:11
%S A275437 1,2,2,1,2,2,2,2,1,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,
%T A275437 2,1,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,
%U A275437 2,2,2,2,2,2,2,2,2,2,2,2,1
%N A275437 Triangle read by rows: T(n,k) is the number of 01-avoiding binary words of length n having degree of asymmetry equal to k (n >= 0; 0 <= k <= floor(n/2)).
%C A275437 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).
%C A275437 A sequence is palindromic if and only if its degree of asymmetry is 0.
%C A275437 Number of entries in row n is 1 + floor(n/2).
%C A275437 Sum of entries in row n is n+1.
%C A275437 Sum(k*T(n,k), k>=0) = A002620(n).
%H A275437 Michael De Vlieger, <a href="/A275437/b275437.txt">Table of n, a(n) for n = 0..9999</a> (rows 0 <= n <= 199).
%F A275437 T(2k,k)=1 (k >= 0); T(n,k)=2 if k <= floor(n/2); T(n,k)=0 if k > floor(n/2).
%F A275437 G.f.:  G(t,z) = (1 + z)/((1 - z)(1 - tz^2)).
%e A275437 Row 4 is [2,2,1] because the 01-avoiding binary words of length 4 are 0000, 1000, 1100, 1110, and 1111, having asymmetry degrees 0, 1, 2, 1, and 0, respectively.
%e A275437 Triangle starts:
%e A275437   1;
%e A275437   2;
%e A275437   2, 1;
%e A275437   2, 2;
%e A275437   2, 2, 1;
%e A275437   2, 2, 2.
%p A275437 T:= proc(n,k) if n = 2*k then 1 elif k <= floor((1/2)*n) then 2 else 0 end if end proc: for n from 0 to 20 do seq(T(n,j),j=0..floor((1/2)*n)) end do; # yields sequence in triangular form
%t A275437 Table[BinCounts[#, {0, Floor[n/2] + 1, 1}] &@ Map[Total@ BitXor[Take[#, Ceiling[Length[#]/2]], Reverse@ Take[#, -Ceiling[Length[#]/2]]] &, Select[PadLeft[IntegerDigits[#, 2], n] & /@ Range[0, 2^n - 1], Length@ SequenceCases[#, {0, 1}] == 0 &]], {n, 0, 15}] // Flatten (* _Michael De Vlieger_, Aug 15 2016, Version 10.1 *)
%t A275437 Table[If[k == n/2, 1, 2], {n, 15}, {k, Floor[n/2]}] (* _Michael De Vlieger_, Nov 05 2017 *)
%Y A275437 Cf. A002620, A169695.
%K A275437 nonn,easy,tabf
%O A275437 0,2
%A A275437 _Emeric Deutsch_, Aug 15 2016