A096093
Numbers, not divisible by 10, whose digits can be permuted to get a proper divisor.
Original entry on oeis.org
105, 108, 405, 702, 703, 1001, 1005, 1008, 1053, 2002, 2016, 2025, 2079, 2106, 3003, 3024, 3042, 3045, 3105, 3402, 4004, 4005, 5005, 5049, 6006, 6031, 6045, 6048, 6072, 6075, 6084, 6105, 6804, 7007, 7011, 7128, 7425, 8008, 8019, 8092, 8316, 8712, 9009
Offset: 1
105 is a term as 015 is a proper divisor of 105.
2178 is a proper divisor of 8712 and 8712/2178=4.
1089 is a proper divisor of 9801 and 9801/1089=9.
-
filter:= proc(n) local L,nL,P;
L:= convert(n,base,10);
nL:= nops(L);
P:= subs(L=NULL, combinat:-permute(L));
ormap(p -> n mod add(p[i]*10^(i-1),i=1..nL) = 0, P)
end proc:
select(filter, [seq(seq(10*i+j,j=1..9),i=1..10000)]); # Robert Israel, Jun 01 2020
-
f[n_] := Union[ IntegerQ /@ Drop[ n/FromDigits /@ Permutations[IntegerDigits[n]], 1]][[ -1]]; Select[ Range[ 9015], Mod[ #, 10] != 0 && f[ # ] == True &] (* Robert G. Wilson v, Jun 23 2004 *)
A245680
Numbers x whose digits can be permuted to produce a multiple of x.
Original entry on oeis.org
1035, 1089, 1359, 1386, 1782, 2178, 2475, 10035, 10089, 10350, 10449, 10890, 10899, 10989, 11688, 11883, 12375, 12903, 13029, 13359, 13449, 13590, 13599, 13659, 13860, 13986, 14085, 14247, 14724, 14859, 15192, 16782, 17604, 17802, 17820, 17832, 17982, 18027
Offset: 1
A permutation of 1782 is 7128 and 7128 / 1782 = 4.
A permutation of 11688 is 81816 and 81816 / 11688 = 7.
-
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 print(n); break; fi; od; od; end: P(10^6);
# Alternative:
N:= 100: # to get the first N entries
count:= 0:
for x from 10 while count < N do
M:= 10^(ilog10(x)+1)-1;
L:= sort(convert(x,base,10));
for i from 2 to floor(M/x) do
Lp:= sort(convert(i*x,base,10));
if Lp = L then
count:= count+1;
A[count]:= x;
break;
fi
od
od:
seq(A[i],i=1..count); # Robert Israel, Jul 29 2014
-
fQ[n_] := AnyTrue[Rest[FromDigits /@ Permutations[IntegerDigits@ n]], Divisible[#, n] &]; Select[Range@ 20000, fQ] (* Michael De Vlieger, Oct 27 2015, Version 10 *)
-
for(n=1,10^8,d=vecsort(digits(n));p=0;for(k=2,9,dd=vecsort(digits(n*k));if(d==dd,p++;break));if(p>0,print1(n,", "))) \\ quicker program Derek Orr, Jul 29 2014
-
import itertools
from itertools import permutations
for n in range(1,10**5):
plist = list(permutations(str(n)))
for i in plist:
num = ''
for j in range(len(i)):
num += i[j]
if int(num)%n==0 and int(num)/n > 1:
print(n,end=', ') # Derek Orr, Jul 29 2014
A245682
Numbers x whose digits can be permuted to produce more than a single multiple of x.
Original entry on oeis.org
123876, 142857, 153846, 230769, 285714, 1028574, 1218753, 1238760, 1239876, 1246878, 1294857, 1402857, 1420785, 1425897, 1428507, 1428570, 1428597, 1428705, 1429857, 1485792, 1492857, 1538460, 1539846, 1570284, 1584297, 2300769, 2307690, 2307699, 2309769, 2857014, 2857140, 2859714, 2985714, 10028574, 10178649
Offset: 1
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.
-
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
-
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
-
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
A382945
a(n) is the least positive integer k having a divisor d such that k/d is not a power of n and the base n expansions of k and d, possibly with leading zeros, have, up to order, the same digits.
Original entry on oeis.org
9, 28, 18, 16, 40, 36, 42, 64, 105, 45, 154, 105, 130, 168, 260, 120, 340, 96, 266, 275, 495, 231, 460, 351, 450, 273, 792, 175, 928, 280, 682, 1024, 308, 459, 1302, 741, 962, 665, 1612, 288, 1804, 560, 1290, 1265, 2139, 1035, 1974, 540, 952, 715, 2720, 585
Offset: 2
The first terms, alongside an appropriate divisor d, in bases 10 and n, are:
n a(n) d a(n) in base n d in base n
-- ---- --- -------------- -----------
2 9 3 1,0,0,1 1,1
3 28 4 1,0,0,1 1,1
4 18 6 1,0,2 1,2
5 16 8 3,1 1,3
6 40 10 1,0,4 1,4
7 36 12 5,1 1,5
8 42 21 5,2 2,5
9 64 16 7,1 1,7
10 105 15 1,0,5 1,5
11 45 15 4,1 1,4
12 154 22 1,0,10 1,10
13 105 21 8,1 1,8
14 130 65 9,4 4,9
15 168 56 11,3 3,11
16 260 20 1,0,4 1,4
-
a(n) = {
for (k = 1, oo,
my (t = vecsort(select(sign, digits(k, n))));
fordiv (k, d,
if ((k/d) != n^valuation(k/d, n)
&& vecsort(select(sign, digits(d, n)))==t,
return (k);););); }
Showing 1-4 of 4 results.
Comments