login
a(n) is the least x >= 0 such that A362505(n) = x * y for some y with the same set of decimal digits as x.
2

%I #10 Apr 24 2023 13:09:48

%S 0,1,2,3,1,4,5,6,2,7,8,9,3,10,1,11,12,13,4,14,15,12,16,5,17,18,19,6,

%T 20,13,21,2,22,23,7,14,24,25,26,8,27,23,15,28,29,9,30,31,16,3,10,24,

%U 10,32,33,10,1,34,17,11,35,36,25,12,37,38,12,18,34,12,13

%N a(n) is the least x >= 0 such that A362505(n) = x * y for some y with the same set of decimal digits as x.

%H Rémy Sigrist, <a href="/A362506/b362506.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A362506/a362506.png">Scatterplot of the first 100000 terms</a>

%e The first terms, alongside the corresponding y and A362505(n), are:

%e n a(n) y A362505(n)

%e -- ---- --- ----------

%e 1 0 0 0

%e 2 1 1 1

%e 3 2 2 4

%e 4 3 3 9

%e 5 1 11 11

%e 6 4 4 16

%e 7 5 5 25

%e 8 6 6 36

%e 9 2 22 44

%e 10 7 7 49

%e 11 8 8 64

%e 12 9 9 81

%e 13 3 33 99

%e 14 10 10 100

%e 15 1 111 111

%o (PARI) { print1(0); for (k = 1, 1469, fordiv (k, x, if (Set(digits(x)) == Set(digits(k/x)), print1 (", "x); break))) }

%o (Python)

%o from sympy import divisors

%o from itertools import count

%o def agen(): # generator of terms

%o yield 0

%o for n in count(1):

%o for x in divisors(n):

%o if set(str(x)) == set(str(n//x)):

%o yield x

%o break

%o print(list(islice(agen(), 71))) # _Michael S. Branicky_, Apr 23 2023

%Y Cf. A362505.

%K nonn,base

%O 1,3

%A _Rémy Sigrist_, Apr 23 2023