OFFSET
1,3
EXAMPLE
The first terms, alongside an appropriate factorization, are:
n a(n) x y
-- ---- -- ---
1 0 0 0
2 1 1 1
3 4 2 2
4 9 3 3
5 11 1 11
6 16 4 4
7 25 5 5
8 36 6 6
9 44 2 22
10 49 7 7
11 64 8 8
12 81 9 9
13 99 3 33
14 100 10 10
15 111 1 111
PROG
(PARI) is(n) = { if (n==0, 1, fordiv (n, x, if (Set(digits(x))==Set(digits(n/x)), return (1))); return (0)); }
(Python)
from sympy import divisors
def ok(n): return n == 0 or any(set(str(x)) == set(str(n//x)) for x in divisors(n))
print([k for k in range(1025) if ok(k)]) # Michael S. Branicky, Apr 23 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 23 2023
STATUS
approved