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.

A222810 Number of n-digit numbers N with distinct digits such that the reversal of N divides N.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 10 2013

Keywords

Comments

Suggested by A214927.
a(n)=0 for all n > 6.

Examples

			Solutions with 1 through 6 digits:
[1, 2, 3, 4, 5, 6, 7, 8, 9],
[10, 20, 30, 40, 50, 60, 70, 80, 90],
[510, 540, 810],
[5610, 5940, 8712, 8910, 9801],
[65340, 87120, 87912],
[659340, 879120],
		

Crossrefs

For the actual numbers see A223080.

Programs

  • Python
    import collections
    col = []
    count = 0
    for n in range(0, 9):
        a = 10**n
        stop = 10**(n+1)
        while a < stop:
            b = str(a)
            c = list(b)
            d = c[::-1]
            e = int("".join(c))
            f = int("".join(d))
            counter = collections.Counter(c)
            if e % f == 0 and counter.most_common(1)[0][1] == 1:
                count += 1
                col.append(a)
            a += 1
        print(n+1, " digits: ", count, " elements: ", col)
        count = 0
        col = []
    # David Consiglio, Jr., Dec 04 2014

Extensions

a(8)-a(9) from David Consiglio, Jr., Dec 04 2014