OFFSET
1,1
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..3643 from Ely Golden)
EXAMPLE
100255 is a member of this sequence as 100255 = 5*20051, which is exactly the same set of digits as 100255.
PROG
(SageMath)
def digits(x, n):
if((x<=0)|(n<2)):
return []
li=[]
while(x>0):
d=divmod(x, n)
li.append(d[1])
x=d[0]
li.sort()
return li;
def factorDigits(x, n):
if((x<=0)|(n<2)):
return []
li=[]
f=list(factor(x))
#ensures inequality of digits(x, n) and factorDigits(x, n) if x is prime
if((len(f)==1)&(f[0][1]==1)):
return [];
for c in range(len(f)):
for d in range(f[c][1]):
ld=digits(f[c][0], n)
li+=ld
li.sort()
return li;
#this variable affects the radix
radix=10
c=2
index=1
while(index<=100):
if(digits(c, radix)==factorDigits(c, radix)):
print(str(index)+" "+str(c))
index+=1
c+=1
print("complete")
(Python)
from sympy import factorint
def ok(n):
f = factorint(n)
return sum(f.values()) > 1 and sorted(str(n)) == sorted("".join(str(p)*f[p] for p in f))
print([k for k in range(700000) if ok(k)]) # Michael S. Branicky, Apr 20 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ely Golden, Jan 11 2017
STATUS
approved
