OFFSET
1,2
COMMENTS
A permutation of the natural numbers.
LINKS
S. G. Krantz and J. D. McNeal, Creating more convergent series, Amer. Math. Monthly, 111 (No. 1, 2004), 32-38.
FORMULA
The k-th term of the n-th block is T(n, k) = n^2-n+1+(-1)^k*floor(k/2), k=1..2*n-1. - Vladeta Jovovic, Jan 16 2004
EXAMPLE
B_4 = 10,11,12,13,14,15,16 becomes 13, 14,12, 15,11, 16,10.
1; 3,4,2; 7,8,6,9,5; 13,14,12,15,11,16,10; ...
MATHEMATICA
pb[c_]:=Module[{len=(Length[c]-1)/2}, Flatten[Join[{c[[len+1]]}, Thread[ {Take[c, -len], Reverse[Take[c, len]]}]]]] ; Flatten[pb/@ Table[Range[ (n-1)^2+1, n^2], {n, 10}]] (* Harvey P. Dale, Jun 18 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 16 2004
EXTENSIONS
More terms from Vladeta Jovovic, Jan 16 2004
STATUS
approved