OFFSET
1,2
COMMENTS
A permutation of the natural numbers. Mentioned as d(n) in A269837.
Difference table:
1, 2, 4, 3, 6, 5, 9, 8, 7, 12, 11, 10, 16, 15, 14, 13, 20, 19, 18, ...
1, 2, -1, 3, -1, 4, -1, -1, 5, -1, -1, 6, -1, -1, -1, 7, -1, -1, -1, ...
1, -3, 4, -4, 5, -5, 0, 6, -6, 0, 7, -7, 0, 0, 8, -8, 0, 0, 9, ...
etc.
FORMULA
Empirical g.f. as triangle: (1-y*x^3+y^2*x^4-2*y*x^4-y^2*x^5+y*x^5+y^2*x^7)*x/((1+x)*(1-x)^3*(1-y*x^2)^3). - Robert Israel, Apr 11 2016
EXAMPLE
Irregular triangle:
1,
2,
4, 3,
6, 5,
9, 8, 7,
12, 11, 10,
16, 15, 14, 13,
20, 19, 18, 17,
25, 24, 23, 22, 21,
30, 29, 28, 27, 26,
etc.
MAPLE
count:= 0:
for r from 1 to 20 do
d:= ceil(r/2);
for i from 0 to d-1 do A[r, i]:= count+ d-i od;
count:= count+d;
od:
seq(seq(A[r, i], i=0..ceil(r/2)-1), r=1..20); # Robert Israel, Apr 11 2016
MATHEMATICA
Table[Reverse@ Range[Floor[n/2]] + Floor[(n - 1)^2/4], {n, 16}] // Flatten (* Michael De Vlieger, Apr 11 2016 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Paul Curtz, Apr 11 2016
STATUS
approved