cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A057556 Lexicographic ordering of M x M x M, where M={0,1,2,...}.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 1, 1, 0, 2, 0, 1, 0, 1, 1, 1, 0, 2, 0, 0, 0, 0, 3, 0, 1, 2, 0, 2, 1, 0, 3, 0, 1, 0, 2, 1, 1, 1, 1, 2, 0, 2, 0, 1, 2, 1, 0, 3, 0, 0, 0, 0, 4, 0, 1, 3, 0, 2, 2, 0, 3, 1, 0, 4, 0, 1, 0, 3, 1, 1, 2, 1, 2, 1, 1, 3, 0, 2, 0, 2, 2, 1, 1, 2, 2, 0, 3, 0, 1, 3, 1, 0, 4, 0, 0, 0, 0, 5, 0, 1, 4, 0, 2, 3, 0, 3, 2, 0, 4, 1, 0, 5, 0, 1, 0, 4, 1, 1, 3, 1, 2, 2, 1, 3, 1, 1, 4, 0, 2, 0, 3, 2, 1, 2, 2, 2, 1, 2, 3, 0, 3, 0, 2, 3, 1, 1, 3, 2, 0, 4, 0, 1, 4, 1, 0, 5, 0, 0
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2000

Keywords

Comments

See A057557 for N x N x N, where N={1,2,3,...}.
The triples are sorted first according to their sum, then lexicographically. - Pontus von Brömssen, Aug 16 2023

Examples

			Flatten the list of ordered lattice points, (0,0,0) < (0,0,1) < (0,1,0) < ... to 0,0,0, 0,0,1, 0,1,0, ...
As a three-column array:
  0 0 0
  0 0 1
  0 1 0
  1 0 0
  0 0 2
  0 1 1
  0 2 0
  1 0 1
  1 1 0
  2 0 0
  0 0 3
  0 1 2
  0 2 1
  0 3 0
  1 0 2
  1 1 1
  1 2 0
  2 0 1
  2 1 0
  3 0 0
  ...
		

Crossrefs

Cf. A144625 (each triple reversed).

Programs

  • Mathematica
    lexicographicLattice[{dim_,maxHeight_}]:= Flatten[Array[Sort@Flatten[(Permutations[#1]&)/@IntegerPartitions[#1+dim-1,{dim}],1]&,maxHeight],1]; Flatten@lexicographicLattice[{3,6}]-1
    (* Peter J. C. Moses, Feb 10 2011 *)

Extensions

Extended by Clark Kimberling, Feb 10 2011