cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A322843 Composites k such that the concatenation of the prime factors of k, with multiplicity, in some order is divisible by k.

This page as a plain text file.
%I A322843 #26 Apr 16 2024 21:02:58
%S A322843 24,44,52,105,114,152,176,348,378,474,548,576,612,636,1518,1908,1911,
%T A322843 2688,3168,3204,3425,3905,4704,5292,5824,6372,7695,7824,7868,7928,
%U A322843 8064,8208,8352,8398,9072,10128,10296,10302,12467,17424,24424,25662,25872,26712,26816,27808,28749,29484,30912,31356
%N A322843 Composites k such that the concatenation of the prime factors of k, with multiplicity, in some order is divisible by k.
%C A322843 If p is a prime with d digits that divides 10^(d+1)+1, then 4*p is in the sequence.
%H A322843 Chai Wah Wu, <a href="/A322843/b322843.txt">Table of n, a(n) for n = 1..802</a> (terms 1..329 from Robert Israel, terms 330..500 from Michael S. Branicky)
%e A322843 52 is in the sequence because 52 = 2*2*13 and 2132 is divisible by 52.
%e A322843 105 is in the sequence because 105 = 3*5*7 and 735 is divisible by 105.
%p A322843 filter:= proc(n) local L, P, t;
%p A322843   if isprime(n) then return false fi;
%p A322843   L:= map(t -> t[1]$t[2],ifactors(n)[2]);
%p A322843   ormap(t -> (op(sscanf(cat(op(t)),"%d"))/n)::integer,  combinat:-permute(L))
%p A322843 end proc:
%p A322843 select(filter, [$4..50000]);
%t A322843 divQ@n_:=AnyTrue[(FromDigits@Flatten@IntegerDigits@#)&/@ (Permutations@Flatten@(ConstantArray @@#&/@ FactorInteger@n)),Divisible[#, n] &];
%t A322843 Cases[Range@50000,_?(CompositeQ@#&&divQ@# &)] (* _Hans Rudolf Widmer_, Jan 15 2024 *)
%o A322843 (Python)
%o A322843 from sympy import factorint, isprime
%o A322843 from sympy.utilities.iterables import multiset_permutations as MP
%o A322843 def ok(n):
%o A322843     if n < 4 or isprime(n): return False
%o A322843     mpf = []; [mpf.extend([str(p)]*e) for p, e in factorint(n).items()]
%o A322843     return any(int("".join(p))%n == 0 for p in MP(mpf))
%o A322843 print([k for k in range(32000) if ok(k)]) # _Michael S. Branicky_, Jan 19 2024
%Y A322843 Cf. A002808.
%K A322843 nonn,base
%O A322843 1,1
%A A322843 _J. M. Bergot_ and _Robert Israel_, Dec 28 2018