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.

A261370 Permutation of nonnegative integers where a number having digits in nondescending order is followed by all numbers having the same digits arranged in increasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 13, 31, 14, 41, 15, 51, 16, 61, 17, 71, 18, 81, 19, 91, 20, 22, 23, 32, 24, 42, 25, 52, 26, 62, 27, 72, 28, 82, 29, 92, 30, 33, 34, 43, 35, 53, 36, 63, 37, 73, 38, 83, 39, 93, 40, 44, 45, 54, 46, 64, 47, 74, 48, 84
Offset: 0

Views

Author

David A. Corneth, Aug 17 2015

Keywords

Comments

If a number contains a zero, then some permutation will yield a number with a leading zero, which is already in the sequence without the leading zero. So that permutation is not included. For example, 102 contains a zero, so 012 and 021 are permutations of these numbers' digits. But they are actually 12 and 21, which are already in the sequence. This leaves 120, 201 and 210 to be added to the sequence after 102.
From Rémy Sigrist, May 01 2017 : (Start)
- This sequence is to base 10 what A187769 is to base 2,
- Beyond the initial 0, this sequence can be seen as an irregular table, where the n-th row corresponds to the permutation class of A179239(n).
(End)

Crossrefs

Programs

  • Mathematica
    a = {0}; f[n_] := Block[{w = Sort@ Permutations@ IntegerDigits@ n}, w = Delete[w, Position[First /@ w, 0]]]; Do[If[! MemberQ[a, n], AppendTo[a, FromDigits /@ f@ n]], {n, 105}]; DeleteDuplicates@ Flatten@ a (* Michael De Vlieger, Sep 07 2015 *)