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.

A329278 Irregular table read by rows. The n-th row is the permutation of {0, 1, 2, ..., 2^n-1} given by T(n,k) = k(k+1)/2 (mod 2^n).

Original entry on oeis.org

0, 0, 1, 0, 1, 3, 2, 0, 1, 3, 6, 2, 7, 5, 4, 0, 1, 3, 6, 10, 15, 5, 12, 4, 13, 7, 2, 14, 11, 9, 8, 0, 1, 3, 6, 10, 15, 21, 28, 4, 13, 23, 2, 14, 27, 9, 24, 8, 25, 11, 30, 18, 7, 29, 20, 12, 5, 31, 26, 22, 19, 17, 16, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 2
Offset: 0

Views

Author

Peter Kagey, Nov 11 2019

Keywords

Comments

Conjecture: for n > 0, the n-th row has 2^(n-1)-1 descents.
T(n,k) = A000217(k) for 0 <= k <= A017911(n+1), and T(n,2^n-1) = 2^(n-1).

Examples

			Table begins:
  0;
  0, 1;
  0, 1, 3, 2;
  0, 1, 3, 6,  2,  7, 5,  4;
  0, 1, 3, 6, 10, 15, 5, 12, 4, 13, 7, 2, 14, 11, 9, 8;
  ...
		

Crossrefs

Programs

  • Maple
    T:= (n, k)-> irem(k*(k+1)/2, 2^n):
    seq(seq(T(n, k), k=0..2^n-1), n=0..6);  # Alois P. Heinz, Jan 08 2020

A363674 T(n,k) is the decimal equivalent of the n-bit inverted Gray code for k; triangle T(n,k), n>=0, 0<=k<=2^n-1, read by rows.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Jun 14 2023

Keywords

Comments

Row n is a permutation of {0, 1, ..., A000225(n)}.

Examples

			Triangle T(n,k) begins:
   0;
   1,  0;
   3,  2,  0,  1;
   7,  6,  4,  5, 1, 0,  2,  3;
  15, 14, 12, 13, 9, 8, 10, 11, 3, 2, 0, 1, 5, 4, 6, 7;
  ...
T(n,k) written in n-bit binary begins:
    ();
     1,    0;
    11,   10,   00,   01;
   111,  110,  100,  101,  001,  000,  010,  011;
  1111, 1110, 1100, 1101, 1001, 1000, 1010, 1011, 0011, 0010, 0000, ...;
  ...
		

Crossrefs

Columns k=0-2 give: A000225, A000918 (for n>=1), A028399 (for n>=2).
Row sums give A006516.

Programs

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

Formula

T(n,k) = 2^n - 1 - A003188(k) = A000225(n) - A003188(k).
Sum_{k=0..2^n-1} (-1)^k * T(n,k) = A063524(n).
T(n,0) = T(n+1,2^(n+1)-1) = A000225(n).
T(n,A000975(n)) = 0.
T(n,A097072(n)) = 1 for n >= 1.
T(n,k) = T(n-1,k) + 2^(n-1) for n >= 1 and 0 <= k < 2^(n-1).
T(n,k) = T(n-1,2^n-1-k) for n >= 1 and 2^(n-1) <= k < 2^n.
A000120(T(n,n)) = A236840(n).

A014833 a(n) = 2^n - n*(n+1)/2.

Original entry on oeis.org

1, 1, 1, 2, 6, 17, 43, 100, 220, 467, 969, 1982, 4018, 8101, 16279, 32648, 65400, 130919, 261973, 524098, 1048366, 2096921, 4194051, 8388332, 16776916, 33554107, 67108513, 134217350, 268435050, 536870477, 1073741359, 2147483152, 4294966768, 8589934031, 17179868589
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [2^n - n*(n+1)/2: n in [0..50]]; // Vincenzo Librandi, Apr 25 2011
  • Maple
    seq(2^n-n*(n+1)/2, n=0..30); # Zerinvary Lajos, Jul 01 2007
  • Mathematica
    Table[2^n-n (n+1)/2,{n,0,50}] (* or *) LinearRecurrence[{5,-9,7,-2},{1,1,1,2},50] (* Harvey P. Dale, May 12 2011 *)

Formula

From Harvey P. Dale, May 12 2011: (Start)
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4); a(0)=1, a(1)=1, a(2)=1, a(3)=2.
G.f.: 1/(1-2*x) + 1/(-1+x)^3 + 1/(-1+x)^2. (End)
a(n) = A331105(n,n) for n>0. - Alois P. Heinz, Jan 16 2020
E.g.f.: exp(x)*(exp(x) - x*(x + 2)/2). - Elmo R. Oliveira, Mar 06 2025
Showing 1-3 of 3 results.