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.

A326307 a(n) is the index of n in the ordered list of the numbers with the same digits as n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

David A. Corneth, Oct 17 2019

Keywords

Comments

Ordinal transform of A328447.

Examples

			a(321) = 6 as 321 is the sixth number made of the digits [1, 2, 3]. The five smaller numbers having these digits are 123, 132, 213, 231, 312.
		

Crossrefs

Programs

  • PARI
    see Corneth link
    
  • PARI
    { o = vector(100); for (n=0, 87, print1 (o[1+fromdigits(vecsort(digits(n,base=10),,4),base)]++ ", ")) } \\ Rémy Sigrist, Oct 17 2019
    
  • PARI
    A326307(n,D=Vecsmall(digits(n)),c=1)={forperm(vecsort(D),d, d==D&&break; d[1]&&c++);c} \\ M. F. Hasler, May 19 2021
    
  • Python
    from collections import Counter
    from itertools import count, islice
    def agen(): # generator of terms
        digmultisetcount = Counter()
        for n in count(0):
            key = "".join(sorted(str(n)))
            digmultisetcount[key] += 1
            yield digmultisetcount[key]
    print(list(islice(agen(), 88))) # Michael S. Branicky, Jan 30 2025

Formula

a(A179239(n)) = 1.
a(10+n) = A007953(9*n)/9 (A007953 = sum of digits) for 0 < n < 91, but a(101) = 1 while A007953(9*91)/9 = 2. - M. F. Hasler, May 19 2021

Extensions

Edited by N. J. A. Sloane, Oct 24 2019