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

A362030 Irregular triangle read by rows where row n contains the balanced binary words of length 2n interpreted as binary numbers.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 10, 12, 7, 11, 13, 14, 19, 21, 22, 25, 26, 28, 35, 37, 38, 41, 42, 44, 49, 50, 52, 56, 15, 23, 27, 29, 30, 39, 43, 45, 46, 51, 53, 54, 57, 58, 60, 71, 75, 77, 78, 83, 85, 86, 89, 90, 92, 99, 101, 102, 105, 106, 108, 113, 114, 116, 120, 135
Offset: 1

Views

Author

Louis Conover, Apr 05 2023

Keywords

Comments

Within a row, strings are ordered lexicographically, which means the resulting values are ordered numerically.
This is from an idea of David Lovler, which he calls "zigzags". It is a rearrangement of A072601. A072603 lists all the numbers that are not in this sequence. A000984 gives the number of coin flip sequences of length 2,4,6, etc.
Not a permutation of the integers. E.g. 8 never occurs. When there are more 0's than 1's, adding 0's doesn't bring it to balance. - Kevin Ryde, Aug 31 2023

Examples

			The first few terms written as binary words with leading 0's: 01, 10, 0011, 0101, 0110, 1001, 1010, 1100, 000111, 001011, 001101, 001110, ... (cf. A368804).
Triangle T(n,k) begins:
   1,  2;
   3,  5,  6,  9, 10, 12;
   7, 11, 13, 14, 19, 21, 22, 25, 26, 28, 35, 37, 38, ...;
  15, 23, 27, 29, 30, 39, 43, 45, 46, 51, 53, 54, 57, ...;
  ...
		

Crossrefs

Columns k=1-2 give: A000225, A083329.
Row sums give A131568.
Main diagonal gives A036563(n+1).
Cf. A000984 (row lengths), A072601, A072603, A368804 (binary).

Programs

  • Maple
    T:= n-> sort(map(Bits[Join], combinat[permute]([0$n, 1$n])))[]:
    seq(T(n), n=1..4);  # Alois P. Heinz, Apr 13 2023
  • Mathematica
    T[n_] := Sort[FromDigits[#, 2] & /@ Permutations[Join[ConstantArray[0, n], ConstantArray[1, n]]]]; Flatten[Table[T[n], {n, 1, 4}]][[1 ;; 64]] (* Robert P. P. McKone, Aug 29 2023 *)

A356117 T(n, k) = [x^k] (1/2 - x)^(-n) - (1 - x)^(-n).

Original entry on oeis.org

0, 1, 3, 3, 14, 45, 7, 45, 186, 630, 15, 124, 630, 2540, 8925, 31, 315, 1905, 8925, 35770, 128898, 63, 762, 5355, 28616, 128898, 515844, 1891890, 127, 1785, 14308, 85932, 429870, 1891890, 7568484, 28113228, 255, 4088, 36828, 245640, 1351350, 6487272, 28113228, 112456344, 421717725
Offset: 0

Views

Author

Peter Luschny, Aug 22 2022

Keywords

Examples

			Triangle T(n, k) starts:
[0]   0;
[1]   1,    3;
[2]   3,   14,    45;
[3]   7,   45,   186,    630;
[4]  15,  124,   630,   2540,    8925;
[5]  31,  315,  1905,   8925,   35770,  128898;
[6]  63,  762,  5355,  28616,  128898,  515844,  1891890;
[7] 127, 1785, 14308,  85932,  429870, 1891890,  7568484,  28113228;
[8] 255, 4088, 36828, 245640, 1351350, 6487272, 28113228, 112456344, 421717725;
		

Crossrefs

Cf. A000225 (column 0), A059672 (column 1), A059937 (column 2), A131568 (main diagonal), A134346, A327318.

Programs

  • Maple
    ser := series((1/2 - x)^(-n) - (1 - x)^(-n), x, 20):
    seq(seq(coeff(ser, x, k), k = 0..n), n = 0..9);
  • Mathematica
    row[n_] := CoefficientList[Series[(1/2 - x)^(-n) - (1 - x)^(-n), {x, 0, n}], x]; row[0] = {0}; Table[row[n], {n, 0, 8}] // Flatten (* Amiram Eldar, Aug 22 2022 *)

Formula

T(n, k) = (2^(n+k) - 1) * binomial(n+k-1, k). - John Keith, Aug 23 2022
Showing 1-2 of 2 results.