OFFSET
1,2
COMMENTS
The natural numbers are filled into square blocks of edge length 2, 4, 6, 8, ...
by taking A016742(n+1) = 4, 16, 36, ... at a time:
.......1..2......
.......3..4......
....5..6..7..8...
....9.10.11.12...
...13.14.15.16...
...17.18.19.20...
21.22.23.24.25.26
27.28.29.30.31.32
33.34.35.36.37.38
39.40.41.42.43.44
Reading down the column just left from the center yields a(n).
The length of the rows is given by A001670.
The number of elements in each square block, 4, 16, 36, etc., are the first differences of A166464:
Reading the blocks from right to left, row by row, we obtain a permutation of the integers, which starts similar to A166133.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..10000
MATHEMATICA
r[1] = Range[4]; r[n_] := r[n] = Range[r[n-1][[-1]]+1, r[n-1][[-1]]+(2n)^2 ];
s[n_] := Partition[r[n], Sqrt[Length[r[n]]]][[All, n]];
A167381 = Table[s[n], {n, 1, 7}] // Flatten (* Jean-François Alcover, Mar 26 2017 *)
Module[{nn=7, c}, c=TakeList[Range[(2/3)*nn(nn+1)(2*nn+1)], (2*Range[ nn])^2]; Table[Take[c[[n]], {n, -1, 2*n}], {n, nn}]]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 18 2018 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 02 2009
EXTENSIONS
Edited by R. J. Mathar, Aug 29 2010
More terms from Jean-François Alcover, Mar 26 2017
STATUS
approved