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.

This page as a plain text file.
%I A222810 #30 Dec 15 2024 19:52:31
%S A222810 9,9,3,5,3,2,0,0,0
%N A222810 Number of n-digit numbers N with distinct digits such that the reversal of N divides N.
%C A222810 Suggested by A214927.
%C A222810 a(n)=0 for all n > 6.
%e A222810 Solutions with 1 through 6 digits:
%e A222810 [1, 2, 3, 4, 5, 6, 7, 8, 9],
%e A222810 [10, 20, 30, 40, 50, 60, 70, 80, 90],
%e A222810 [510, 540, 810],
%e A222810 [5610, 5940, 8712, 8910, 9801],
%e A222810 [65340, 87120, 87912],
%e A222810 [659340, 879120],
%o A222810 (Python)
%o A222810 import collections
%o A222810 col = []
%o A222810 count = 0
%o A222810 for n in range(0, 9):
%o A222810     a = 10**n
%o A222810     stop = 10**(n+1)
%o A222810     while a < stop:
%o A222810         b = str(a)
%o A222810         c = list(b)
%o A222810         d = c[::-1]
%o A222810         e = int("".join(c))
%o A222810         f = int("".join(d))
%o A222810         counter = collections.Counter(c)
%o A222810         if e % f == 0 and counter.most_common(1)[0][1] == 1:
%o A222810             count += 1
%o A222810             col.append(a)
%o A222810         a += 1
%o A222810     print(n+1, " digits: ", count, " elements: ", col)
%o A222810     count = 0
%o A222810     col = []
%o A222810 # _David Consiglio, Jr._, Dec 04 2014
%Y A222810 Cf. A214927, A222809, A222811, A222812.
%Y A222810 For the actual numbers see A223080.
%K A222810 nonn,base
%O A222810 1,1
%A A222810 _N. J. A. Sloane_, Mar 10 2013
%E A222810 a(8)-a(9) from _David Consiglio, Jr._, Dec 04 2014