OFFSET
1,1
COMMENTS
Decimal digits of m are a permutation of decimal digits of n.
Conjecture: there is an X such that among integers bigger than X more than 50% are in the sequence.
EXAMPLE
148 and 814 have the same set of decimal digits, same smallest prime factor 2, and same largest prime factor 37, so both 148 and 814 are in the sequence.
1080 and 1800 have the same set of decimal digits, same smallest prime factor 2, and same largest prime factor 5.
PROG
(Python)
# primes = [...]
TOP = 10000
smallest = [0]*TOP
largest = [0]*TOP
digitset = [0]*TOP
flags = [0]*TOP
for n in range(1, TOP):
curSm = curLa = curDi = 0
t = x = n
while x:
curDi += 10**( x%10 )
x /= 10
for p in primes:
if t%p==0:
if curSm==0:
curSm = p
curLa = p
t/=p
while t%p==0:
t/=p
if t==1:
break
digitset[n] = curDi
smallest[n] = curSm
largest[n] = curLa
for k in range(1, n):
if smallest[k]==curSm and largest[k]==curLa and digitset[k]==curDi:
flags[k]+=1
flags[n]+=1
for n in range(1, TOP):
if flags[n]>0:
print n,
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Jul 23 2012
STATUS
approved