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.

A347045 Smallest divisor of n with exactly half as many prime factors (counting multiplicity) as n, or 1 if there are none.

This page as a plain text file.
%I A347045 #23 Apr 13 2025 14:55:11
%S A347045 1,1,1,2,1,2,1,1,3,2,1,1,1,2,3,4,1,1,1,1,3,2,1,4,5,2,1,1,1,1,1,1,3,2,
%T A347045 5,4,1,2,3,4,1,1,1,1,1,2,1,1,7,1,3,1,1,6,5,4,3,2,1,4,1,2,1,8,5,1,1,1,
%U A347045 3,1,1,1,1,2,1,1,7,1,1,1,9,2,1,4,5,2,3
%N A347045 Smallest divisor of n with exactly half as many prime factors (counting multiplicity) as n, or 1 if there are none.
%H A347045 Amiram Eldar, <a href="/A347045/b347045.txt">Table of n, a(n) for n = 1..10000</a>
%F A347045 a(n) = Product_{k=1..A001222(n)/2} A027746(n,k) if A001222(n) is even, and 1 otherwise. - _Amiram Eldar_, Nov 02 2024
%e A347045 The divisors of 90 with half bigomega are: 6, 9, 10, 15, so a(90) = 6.
%t A347045 Table[If[#=={},1,Min[#]]&@Select[Divisors[n], PrimeOmega[#]==PrimeOmega[n]/2&],{n,100}]
%t A347045 a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]], np}, np = Length[p]; If[OddQ[np], 1, Times @@ p[[1 ;; np/2]]]]; Array[a, 100] (* _Amiram Eldar_, Nov 02 2024 *)
%o A347045 (Python)
%o A347045 from sympy import divisors, factorint
%o A347045 def a(n):
%o A347045     npf = len(factorint(n, multiple=True))
%o A347045     for d in divisors(n)[1:-1]:
%o A347045         if 2*len(factorint(d, multiple=True)) == npf: return d
%o A347045     return 1
%o A347045 print([a(n) for n in range(1, 88)]) # _Michael S. Branicky_, Aug 18 2021
%o A347045 (Python)
%o A347045 from math import prod
%o A347045 from sympy import factorint
%o A347045 def A347045(n):
%o A347045     fs = factorint(n,multiple=True)
%o A347045     q, r = divmod(len(fs),2)
%o A347045     return 1 if r else prod(fs[:q]) # _Chai Wah Wu_, Aug 20 2021
%Y A347045 The smallest divisor without the condition is A020639 (greatest: A006530).
%Y A347045 Positions of 1's are A026424.
%Y A347045 Positions of even terms are A063745 = 2*A026424.
%Y A347045 The case of powers of 2 is A072345.
%Y A347045 Positions of 2's are A100484.
%Y A347045 Divisors of this type are counted by A345957 (rounded: A096825).
%Y A347045 The rounded version is A347043.
%Y A347045 The greatest divisor of this type is A347046 (rounded: A347044).
%Y A347045 A000005 counts divisors.
%Y A347045 A001221 counts distinct prime factors.
%Y A347045 A001222 counts all prime factors (also called bigomega).
%Y A347045 A056239 adds up prime indices, row sums of A112798.
%Y A347045 A207375 lists central divisors (min: A033676, max: A033677).
%Y A347045 A340387 lists numbers whose sum of prime indices is twice bigomega.
%Y A347045 A340609 lists numbers whose maximum prime index divides bigomega.
%Y A347045 A340610 lists numbers whose maximum prime index is divisible by bigomega.
%Y A347045 A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).
%Y A347045 Cf. A000720, A001747, A027746, A038548, A056924, A063962, A106529, A140271, A244991, A324522, A335433, A335448.
%K A347045 nonn
%O A347045 1,4
%A A347045 _Gus Wiseman_, Aug 16 2021