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.

A333659 a(n) is the greatest number m not yet in the sequence such that the decimal expansions of n and of m have the same digits (up to order but with multiplicity).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 31, 41, 51, 61, 71, 81, 91, 20, 12, 22, 32, 42, 52, 62, 72, 82, 92, 30, 13, 23, 33, 43, 53, 63, 73, 83, 93, 40, 14, 24, 34, 44, 54, 64, 74, 84, 94, 50, 15, 25, 35, 45, 55, 65, 75, 85, 95, 60, 16, 26, 36, 46, 56, 66, 76
Offset: 0

Views

Author

Rémy Sigrist, Sep 02 2020

Keywords

Comments

Leading 0's are ignored.
This sequence is a permutation of the nonnegative integers, which preserves the number of digits (A055642) and the sum of digits (A007953).
This sequence first differs from A321474 and A336956 for n = 101: a(101) = 110 whereas A321474(101) = A336956(101) = 101.

Examples

			For n = 255:
- there are three numbers with the same multiset of digits: 255, 525 and 552,
- so a(255) = 552,
     a(525) = 525,
     a(552) = 255.
		

Crossrefs

See A333658, A337305 and A337598 for similar sequences.
See A331274 for the binary variant.

Programs

  • PARI
    See Links section.

Formula

a(10^n) = 10^n for any n >= 0.