login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A367269
Triangle T(n, k) read by rows and based on A042948 yields a permutation of the natural numbers.
0
1, 4, 3, 6, 5, 2, 13, 12, 9, 8, 15, 14, 11, 10, 7, 26, 25, 22, 21, 18, 17, 28, 27, 24, 23, 20, 19, 16, 43, 42, 39, 38, 35, 34, 31, 30, 45, 44, 41, 40, 37, 36, 33, 32, 29, 64, 63, 60, 59, 56, 55, 52, 51, 48, 47, 66, 65, 62, 61, 58, 57, 54, 53, 50, 49, 46, 89, 88, 85, 84, 81, 80, 77, 76, 73, 72, 69, 68
OFFSET
0,2
COMMENTS
Compare this triangle to A364390.
FORMULA
T(n, k) = (n+1) * (n+2) / 2 + n * (n mod 2) - 2 * k + (k mod 2) for 0 <= k <= n.
T(n, k) = T(n, 0) + A042948(k) for 0 <= k <= n.
T(n, 0) = (n+1) * (n+2) / 2 + n * (n mod 2) for n >= 0.
T(n, n) = (n^2 - n + 2) / 2 + (n+1) * (n mod 2) for n >= 0.
T(2*n, n) = 2 * n^2 + n + 1 + (n mod 2) for n >= 0.
T(n, k) = T(n, k-1) + T(n-1, k) - T(n-1, k-1) for 0 < k < n.
Row sums: A006003(n+1) - 2 * (-1)^n * (floor((n+1)/2))^2 for n >= 0.
G.f. of column k = 0: F(t, 0) = Sum_{n>=0} T(n, 0) * t^n = (1 + 3*t + t^3 - t^4) / ((1-t)^3 * (1+t)^2).
G.f.: F(t, x) = Sum_{n>=0, k=0..n} T(n, k) * x^k * t^n = (F(t, 0) - x * F(x*t, 0)) / (1-x) - 2*x*t / ((1-t) * (1-x*t)^2) + x*t / ((1-t) * (1-x^2*t^2)).
Alt. row sums: (n^(2 - n mod 2) + 2 - n mod 2) / 2 for n >= 0.
EXAMPLE
Triangle T(n, k) for 0 <= k <= n starts:
n\k : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
=================================================================
0 : 1
1 : 4 3
2 : 6 5 2
3 : 13 12 9 8
4 : 15 14 11 10 7
5 : 26 25 22 21 18 17
6 : 28 27 24 23 20 19 16
7 : 43 42 39 38 35 34 31 30
8 : 45 44 41 40 37 36 33 32 29
9 : 64 63 60 59 56 55 52 51 48 47
10 : 66 65 62 61 58 57 54 53 50 49 46
11 : 89 88 85 84 81 80 77 76 73 72 69 68
12 : 91 90 87 86 83 82 79 78 75 74 71 70 67
13 : 118 117 114 113 110 109 106 105 102 101 98 97 94 93
14 : 120 119 116 115 112 111 108 107 104 103 100 99 96 95 92
etc.
MATHEMATICA
T[n_, k_]:= (n+1) * (n+2) / 2 + n * Mod[n, 2] - 2 * k + Mod[k, 2]; Table[T[n, k], {n, 0, 11}, {k, 0, n}]//Flatten (* Stefano Spezia, Dec 06 2023 *)
PROG
(PARI) T(n, k) = (n+1)*(n+2)/2+n*(n%2)-2*k+(k%2)
CROSSREFS
KEYWORD
nonn,easy,tabl
AUTHOR
Werner Schulte, Dec 06 2023
STATUS
approved