login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057554 Lexicographic ordering of MxM, where M={0,1,2,...}. 4

%I #26 Oct 10 2023 16:25:22

%S 0,0,0,1,1,0,0,2,1,1,2,0,0,3,1,2,2,1,3,0,0,4,1,3,2,2,3,1,4,0,0,5,1,4,

%T 2,3,3,2,4,1,5,0,0,6,1,5,2,4,3,3,4,2,5,1,6,0,0,7,1,6,2,5,3,4,4,3,5,2,

%U 6,1,7,0,0,8,1,7,2,6,3,5,4,4,5,3,6,2,7,1,8,0,0,9,1,8,2,7,3,6,4,5,5,4,6,3,7,2,8,1,9,0,0,10,1,9,2,8,3,7,4,6,5,5,6,4,7,3,8,2,9,1,10,0,0,11,1,10,2,9,3,8,4,7,5,6,6,5,7,4,8,3,9,2,10,1,11,0

%N Lexicographic ordering of MxM, where M={0,1,2,...}.

%C A057555 gives the lexicographic ordering of N x N, where N={1,2,3,...}.

%H Alois P. Heinz, <a href="/A057554/b057554.txt">Table of n, a(n) for n = 1..20022</a>

%e Flatten the ordered lattice points: (0,0) < (0,1) < (1,0) < (0,2) < (1,1) < ... as 0,0, 0,1, 1,0, 0,2, 1,1, ...

%t lexicographicLattice[{dim_,maxHeight_}]:= Flatten[Array[Sort@Flatten[(Permutations[#1]&)/@IntegerPartitions[#1+dim-1,{dim}],1]&,maxHeight],1]; Flatten@lexicographicLattice[{2,12}]-1 (* _Peter J. C. Moses_, Feb 10 2011 *)

%o (Python)

%o [l for i in range(20) for k in range(i,-1,-1) for l in (i-k, k)] # _Nicholas Stefan Georgescu_, Oct 10 2023

%Y Cf. A057555, A057556, A057557, A057558, A057559.

%K nonn

%O 1,8

%A _Clark Kimberling_, Sep 07 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 28 14:21 EDT 2024. Contains 372088 sequences. (Running on oeis4.)