|
|
A362675
|
|
Smallest number sharing n distinct (decimal) digits with its largest proper divisor.
|
|
0
|
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
------------------------------------------------
n a(n) Largest proper divisor of a(n)
------------------------------------------------
1 11 1
2 125 25
3 1025 205
4 3105 1035
5 37125 12375
6 251748 125874
7 2051748 1025874
8 20491578 10245789
9 204713568 102356784
10 2046913578 1023456789
|
|
PROG
|
(PARI) f(n) = n/factor(n)[1, 1]; \\ A032742
a(n) = my(k=2); while (#setintersect(Set(digits(k)), Set(digits(f(k)))) != n, k++); k; \\ Michel Marcus, Apr 29 2023
(Python)
from sympy import factorint
from itertools import count
def a(n):
lb = 2*int("1023456789"[:n])
return next(k for k in count(lb) if len(set(str(k)) & set(str(k//min(factorint(k))))) == n)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,fini,full,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|