OFFSET
0,2
COMMENTS
Left half triangle is A000027 (positive integers) (compare with example triangle):
1;
2;
3, 4;
5, 6;
7, 8, 9;
10, 11, 12;
13, 14, 15, 16;
17, 18, 19, 20;
...
LINKS
Jianrui Xie, On Symmetric Invertible Binary Pairing Functions, arXiv:2105.10752 [math.CO], 2021. See (6) p. 3 and p. 5
FORMULA
T(n,k) = T(n,n-k).
T(2*n,n) = (n+1)^2 = A000290(n+1).
T(n,0) = T(n,n) = A033638(n+1).
From Yu-Sheng Chang, May 25 2020: (Start)
O.g.f.: F(z,v) = (z/((-z+1)^3*(z+1)) - v^2*z/((-v*z+1)^3*(v*z+1)))/(1-v) + 1/((-z+1)*(-v*z+1)*(-v*z^2+1)).
T(n,k) = [v^k] (1/8)*(1-v^(n+1))*(2*(n+1)^2 - 1 - (-1)^n)/(1-v) + (v^(2+n) + (1/2*((sqrt(v)-1)^2*(-1)^n - (sqrt(v)+1)^2))*v^((1/2)*n + 1/2) + 1)/(1-v)^2.
T(n,k) = 1 + (1/4)*n*(n+1) + min(k, n-k) + (1/2)*ceiling((1/2)*n). (End)
T(n,k) = ((n+k-1)^2 - ((n+k-1) mod 2))/4 + min(n,k) for n and k >= 1, as an array. See Xie. - Michel Marcus, May 25 2021
EXAMPLE
Triangle begins:
1;
2, 2;
3, 4, 3;
5, 6, 6, 5;
7, 8, 9, 8, 7;
10, 11, 12, 12, 11, 10;
13, 14, 15, 16, 15, 14, 13;
17, 18, 19, 20, 20, 19, 18, 17;
...
MAPLE
A := proc(n, k) ## n >= 0 and k = 0 .. n
1+(1/4)*n*(n+1)+min(k, n-k)+(1/2)*ceil((1/2)*n)
end proc: # Yu-Sheng Chang, May 25 2020
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Philippe Deléham, May 03 2007
EXTENSIONS
Name edited by Michel Marcus, May 25 2021
STATUS
approved