A248915 Composite numbers which divide the concatenation of their prime factors, with multiplicity, in descending order.
378, 12467, 95823, 10715274, 13485829, 111495095, 42002916561, 176685987695
Offset: 1
Examples
Prime factors of 378 are 2,3,3,3,7; concat(7,3,3,3,2) = 73332 and 73332/378 = 194.
Links
- Michael S. Branicky, Python program for Andersen's algorithm extended to arbitrary base/ordering
- StackExchange, New term in ascending order
Programs
-
Maple
with(numtheory); P:=proc(q) local a,b,c,d,j,k,n; for n from 1 to q do if not isprime(n) then a:=ifactors(n)[2]; b:=[]; d:=0; for k from 1 to nops(a) do b:=[op(b),a[k][1]]; od; b:=sort(b); for k from nops(a) by -1 to 1 do c:=1; while not b[k]=a[c][1] do c:=c+1; od; for j from 1 to a[c][2] do d:=10^(ilog10(b[k])+1)*d+b[k]; od; od; if type(d/n,integer) then print(n); fi; fi; od; end: P(10^9);
-
PARI
isok(n) = {my(s = ""); my(f = factor(n)); forstep (i=#f~, 1, -1, for (k=1, f[i,2], s = concat(s, Str(f[i,1])))); (eval(s) % n) == 0;} \\ Michel Marcus, Jun 16 2015
Extensions
a(7)-a(8) from Giovanni Resta, Jun 16 2015
Comments