A034089
Numbers that are proper divisors of the number you get by rotating digits right once.
Original entry on oeis.org
102564, 128205, 142857, 153846, 179487, 205128, 230769, 102564102564, 128205128205, 142857142857, 153846153846, 179487179487, 205128205128, 230769230769, 1012658227848, 1139240506329, 102564102564102564
Offset: 1
-
period(p,q,S=[])=until(setsearch(S,p),S=setunion(S,[p]);p=10*p%q);S=[];until(p==S[1],S=concat(S,p);p=10*p%q);S*10\q /* print list of periods, right-rotated and ratio */ rotquo(n,d)={d=divrem(n,10);d[1]+=d[2]*10^#Str(d[1]);[n,d[1],d[1]/n]} for(k=2,9,for(i=k,9,print1( i/(10*k-1),"\t",rotquo(sum(j=1,#p=period(i,k*10-1),p[j]*10^(#p-j))))) /* build the sequence up to the greatest period */ A034089()={local(S=[],p); for(k=2,9,for(i=k,9,S=concat(S,sum(j=1,#p=period(i,k*10-1),p[j]*10^(#p-j))))); S=vecsort(S); for(i=1,#S, for(c=2,58\p=#Str(S[i]), S=concat(S,S[i]*(10^(c*p)-1)/(10^p-1)) )); vecsort(S)} \\ M. F. Hasler, Nov 18 2007
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
A373407
Smallest positive integer k such that no more than n numbers (formed by multiplying k by a digit) are anagrams of k, or -1 if no such number exists.
Original entry on oeis.org
1, 1035, 123876, 1402857, 1037520684, 142857
Offset: 1
a(2) = 1035, because 1035 * 1 = 1035 and 1035 * 3 = 3105 are anagrams of 1035, and no other number 1035 * i with digit i is an anagram of 1035, and no lesser number verifies this property.
Table n, k, set of multipliers.
1 1 [1]
2 1035 [1, 3]
3 123876 [1, 3, 7]
4 1402857 [1, 2, 3, 5]
5 1037520684 [1, 2, 4, 5, 8]
6 142857 [1, 2, 3, 4, 5, 6]
-
isok(k, n) = my(d=vecsort(digits(k))); sum(i=1, 9, vecsort(digits(k*i)) == d) == n; \\ Michel Marcus, Jun 04 2024
Showing 1-3 of 3 results.
Comments