A322843 Composites k such that the concatenation of the prime factors of k, with multiplicity, in some order is divisible by k.
24, 44, 52, 105, 114, 152, 176, 348, 378, 474, 548, 576, 612, 636, 1518, 1908, 1911, 2688, 3168, 3204, 3425, 3905, 4704, 5292, 5824, 6372, 7695, 7824, 7868, 7928, 8064, 8208, 8352, 8398, 9072, 10128, 10296, 10302, 12467, 17424, 24424, 25662, 25872, 26712, 26816, 27808, 28749, 29484, 30912, 31356
Offset: 1
Examples
52 is in the sequence because 52 = 2*2*13 and 2132 is divisible by 52. 105 is in the sequence because 105 = 3*5*7 and 735 is divisible by 105.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..802 (terms 1..329 from Robert Israel, terms 330..500 from Michael S. Branicky)
Crossrefs
Cf. A002808.
Programs
-
Maple
filter:= proc(n) local L, P, t; if isprime(n) then return false fi; L:= map(t -> t[1]$t[2],ifactors(n)[2]); ormap(t -> (op(sscanf(cat(op(t)),"%d"))/n)::integer, combinat:-permute(L)) end proc: select(filter, [$4..50000]);
-
Mathematica
divQ@n_:=AnyTrue[(FromDigits@Flatten@IntegerDigits@#)&/@ (Permutations@Flatten@(ConstantArray @@#&/@ FactorInteger@n)),Divisible[#, n] &]; Cases[Range@50000,?(CompositeQ@#&&divQ@# &)] (* _Hans Rudolf Widmer, Jan 15 2024 *)
-
Python
from sympy import factorint, isprime from sympy.utilities.iterables import multiset_permutations as MP def ok(n): if n < 4 or isprime(n): return False mpf = []; [mpf.extend([str(p)]*e) for p, e in factorint(n).items()] return any(int("".join(p))%n == 0 for p in MP(mpf)) print([k for k in range(32000) if ok(k)]) # Michael S. Branicky, Jan 19 2024
Comments