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.

A349890 Triangle read by rows: T(n,k) = n * 2^e(n) - (4^e(n) - 1) / 3 - k * (k - 1) / 2 with e(n) = 1 + floor(log_2(n)) for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

1, 3, 2, 7, 6, 4, 11, 10, 8, 5, 19, 18, 16, 13, 9, 27, 26, 24, 21, 17, 12, 35, 34, 32, 29, 25, 20, 14, 43, 42, 40, 37, 33, 28, 22, 15, 59, 58, 56, 53, 49, 44, 38, 31, 23, 75, 74, 72, 69, 65, 60, 54, 47, 39, 30, 91, 90, 88, 85, 81, 76, 70, 63, 55, 46, 36, 107, 106, 104, 101, 97, 92, 86, 79, 71, 62, 52, 41
Offset: 1

Views

Author

Werner Schulte, Dec 04 2021

Keywords

Comments

Conjecture: The terms of the triangle yield a permutation of the positive integers (A000027).

Examples

			The triangle T(n, k) for 1 <= k <= n begins:
n\k:   1   2   3   4   5   6   7   8   9  10  11
================================================
01 :   1
02 :   3   2
03 :   7   6   4
04 :  11  10   8   5
05 :  19  18  16  13   9
06 :  27  26  24  21  17  12
07 :  35  34  32  29  25  20  14
08 :  43  42  40  37  33  28  22  15
09 :  59  58  56  53  49  44  38  31  23
10 :  75  74  72  69  65  60  54  47  39  30
11 :  91  90  88  85  81  76  70  63  55  46  36
etc.
		

Crossrefs

Programs

  • PARI
    T(n,k) = my(e=1+logint(n,2)); n*2^e - (4^e-1)/3 - k*(k-1)/2;
    row(n) = vector(n, k, T(n,k)); \\ Michel Marcus, Dec 05 2021

Formula

T(2^n, 1) = A007583(n) for n >= 0.
T(n, 1) - T(n, n) = A000217(n-1) for n > 0.
T(n, k) = T(n-1, k) + T(n-1, k-1) - T(n-1-2^(e(n-1)-e(n-2)), k-1) with e(n) = 1 + floor(log_2(n)) for n > 3 and 1 < k < n-1 (conjectured).