Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #32 Nov 02 2024 09:13:52
%S 1,2,3,2,5,2,7,4,3,2,11,4,13,2,3,4,17,6,19,4,3,2,23,4,5,2,9,4,29,6,31,
%T 8,3,2,5,4,37,2,3,4,41,6,43,4,9,2,47,8,7,10,3,4,53,6,5,4,3,2,59,4,61,
%U 2,9,8,5,6,67,4,3,10,71,8,73,2,15,4,7,6,79,8
%N Smallest divisor of n with half (rounded up) as many prime factors (counting multiplicity) as n.
%C Appears to contain every positive integer at least once.
%C This is correct. For any integer m, let p be any prime > m. Then a(m*p^A001222(m)) = m. - _Sebastian Karlsson_, Oct 11 2022
%H Amiram Eldar, <a href="/A347043/b347043.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Product_{k=1..ceiling(A001222(n)/2)} A027746(n,k). - _Amiram Eldar_, Nov 02 2024
%e The divisors of 123456 with half bigomega are: 16, 24, 5144, 7716, so a(123456) = 16.
%t Table[Min[Select[Divisors[n],PrimeOmega[#]==Ceiling[PrimeOmega[n]/2]&]],{n,100}]
%t a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]]}, Times @@ p[[1 ;; Ceiling[Length[p]/2]]]]; Array[a, 100] (* _Amiram Eldar_, Nov 02 2024 *)
%o (PARI) a(n) = my(bn=ceil(bigomega(n)/2)); fordiv(n, d, if (bigomega(d)==bn, return (d))); \\ _Michel Marcus_, Aug 18 2021
%o (Python)
%o from sympy import divisors, factorint
%o def a(n):
%o npf = len(factorint(n, multiple=True))
%o for d in divisors(n):
%o if len(factorint(d, multiple=True)) == (npf+1)//2: return d
%o return 1
%o print([a(n) for n in range(1, 81)]) # _Michael S. Branicky_, Aug 18 2021
%o (Python 3.8+)
%o from math import prod
%o from sympy import factorint
%o def A347043(n):
%o fs = factorint(n,multiple=True)
%o l = len(fs)
%o return prod(fs[:(l+1)//2]) # _Chai Wah Wu_, Aug 20 2021
%Y Positions of 2's are A001747.
%Y Positions of odd terms are A005408.
%Y Positions of even terms are A005843.
%Y The case of powers of 2 is A016116.
%Y The smallest divisor without the condition is A020639 (greatest: A006530).
%Y These divisors are counted by A096825 (exact: A345957).
%Y The greatest of these divisors is A347044 (exact: A347046).
%Y The exact version is A347045.
%Y A000005 counts divisors.
%Y A001221 counts distinct prime factors.
%Y A001222 counts all prime factors (also called bigomega).
%Y A056239 adds up prime indices, row sums of A112798.
%Y A207375 lists central divisors (min: A033676, max: A033677).
%Y A340387 lists numbers whose sum of prime indices is twice bigomega.
%Y A340609 lists numbers whose maximum prime index divides bigomega.
%Y A340610 lists numbers whose maximum prime index is divisible by bigomega.
%Y A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).
%Y Cf. A000720, A027746, A038548, A106529, A140271, A244991, A324522, A335433, A335448.
%K nonn
%O 1,2
%A _Gus Wiseman_, Aug 15 2021