OFFSET
1,1
COMMENTS
It is a subset of A245680.
If x < 10^d is in the sequence, then so are x*10^j*(1+10^d+...+10^k*d) for all nonnegative integers j and k. - Robert Israel, Jul 29 2014
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..200
EXAMPLE
Two permutations of 123876 are 371628, 867132 and 371628 / 123876 = 3, 867132 / 123876 = 7.
Five permutations of 142857 are 285714, 428571, 571428, 714285, 857142 and 285714 / 142857 = 2, 428571 / 142857 = 3, 571428 / 142857 = 4, 714285 / 142857 = 5, 857142 / 142857 = 6.
MAPLE
P:=proc(q) local a, b, c, i, j, k, n, t; for n from 1 to q do a:=n; b:=[];
while a>0 do b:=[a mod 10, op(b)]; a:=trunc(a/10); od;
t:=0; for i from 2 to 9 do a:=i*n; c:=[];
while a>0 do c:=[a mod 10, op(c)]; a:=trunc(a/10); od;
if sort(b)=sort(c) then t:=t+1; fi; if t>1 then print(n); break;
fi; od; od; end: P(10^10);
# Alternative
N:= 10: # get a(1) to a(N)
count:= 0:
for x from 10 while count < N do
M:= 10^(ilog10(x)+1)-1;
L:= sort(convert(x, base, 10));
mults:= 0;
for i from 2 to floor(M/x) do
Lp:= sort(convert(i*x, base, 10));
if Lp = L then
mults:= mults+1;
if mults = 2 then
count:= count+1;
A[count]:= x;
print(x);
break;
fi
fi
od
od:
seq(A[i], i=1..count); # Robert Israel, Jul 29 2014
PROG
(Python)
import itertools
from itertools import permutations
for n in range(1, 10**8):
..plist = list(permutations(str(n)))
..count = 0
..lst = []
..for i in plist:
....num = ''
....for j in range(len(i)):
......num += i[j]
....if int(num)%n==0 and int(num)/n > 1:
......if int(num) not in lst:
........lst.append(int(num))
........count += 1
..if count > 1:
....print(n, end=', ') # Derek Orr, Jul 29 2014
(PARI)
for(n=1, 10^8, d=vecsort(digits(n)); p=0; for(k=2, 9, dd=vecsort(digits(n*k)); if(d==dd, p++)); if(p>1, print1(n, ", "))) \\ faster program Derek Orr, Jul 29 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Jul 29 2014
EXTENSIONS
a(7) to a(10) from Robert Israel, Jul 29 2014
a(11) - a(35) from Derek Orr, Jul 29 2014
STATUS
approved