Displaying 31-40 of 106 results found.
page
1
2
3
4
5
6
7
8
9
10
11
Numbers whose multiset of prime factors is separable but has no alternating permutation.
+10
23
270, 378, 594, 702, 918, 1026, 1242, 1566, 1620, 1674, 1750, 1998, 2214, 2268, 2322, 2538, 2625, 2750, 2862, 3186, 3250, 3294, 3564, 3618, 3834, 3942, 4050, 4125, 4212, 4250, 4266, 4482, 4750, 4806, 4875, 5238, 5454, 5508, 5562, 5670, 5750, 5778, 5886, 6102
COMMENTS
A multiset is separable if it has an anti-run permutation (no adjacent parts equal).
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it has the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
EXAMPLE
The terms together with their prime indices begin:
270: {1,2,2,2,3}
378: {1,2,2,2,4}
594: {1,2,2,2,5}
702: {1,2,2,2,6}
918: {1,2,2,2,7}
1026: {1,2,2,2,8}
1242: {1,2,2,2,9}
1566: {1,2,2,2,10}
1620: {1,1,2,2,2,2,3}
1674: {1,2,2,2,11}
1750: {1,3,3,3,4}
1998: {1,2,2,2,12}
2214: {1,2,2,2,13}
2268: {1,1,2,2,2,2,4}
2322: {1,2,2,2,14}
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
wigQ[y_]:=Or[Length[y]==0, Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
sepQ[y_]:=!MatchQ[y, {___, x_, x_, ___}];
Select[Range[1000], Select[Permutations[primeMS[#]], wigQ]=={}&&!Select[Permutations[primeMS[#]], sepQ]=={}&]
CROSSREFS
The partitions with these Heinz numbers are counted by A345166.
Permutations of this type are ranked by A345169.
Numbers with a factorization of this type are counted by A348609.
A003242 counts anti-run compositions.
A344606 counts alternating permutations of prime indices with twins.
A344740 counts twins and partitions with an alternating permutation.
A345164 counts alternating permutations of prime factors.
A345165 counts partitions without an alternating permutation.
A345170 counts partitions with an alternating permutation.
A348379 counts factorizations with an alternating permutation.
Cf. A001222, A071321, A316524, A335126, A344614, A344616, A344652, A344653, A345163, A345168, A345193, A347706, A348380, A348613.
Sum of the odd-indexed parts (odd bisection) of the multiset of prime indices of n.
+10
23
0, 1, 2, 1, 3, 1, 4, 2, 2, 1, 5, 3, 6, 1, 2, 2, 7, 3, 8, 4, 2, 1, 9, 2, 3, 1, 4, 5, 10, 4, 11, 3, 2, 1, 3, 3, 12, 1, 2, 2, 13, 5, 14, 6, 5, 1, 15, 4, 4, 4, 2, 7, 16, 3, 3, 2, 2, 1, 17, 3, 18, 1, 6, 3, 3, 6, 19, 8, 2, 5, 20, 4, 21, 1, 5, 9, 4, 7, 22, 5, 4, 1
COMMENTS
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
EXAMPLE
The prime indices of 1100 are {1,1,3,3,5}, so a(1100) = 1 + 3 + 5 = 9.
The prime indices of 2100 are {1,1,2,3,3,4}, so a(2100) = 1 + 2 + 3 = 6.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Total[First/@Partition[Append[primeMS[n], 0], 2]], {n, 100}]
CROSSREFS
The version for standard compositions is A209281(n+1) (even: A346633).
The even reverse version is A346700.
A000302 counts compositions with odd alternating sum, ranked by A053738.
A029837 adds up parts of standard compositions (alternating: A124754).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A344606 counts alternating permutations of prime indices.
Cf. A000070, A025047, A120452, A341446, A344614, A344617, A344653, A344654, A345957, A345958, A345959.
Sign of the alternating sum of the prime indices of n.
+10
22
0, 1, 1, 0, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1
COMMENTS
Also the sign of the reverse-alternating sum of the partition with Heinz number n.
The alternating sum of a reversed partition (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i. This is equal to (-1)^(k-1) times the number of odd parts in the conjugate partition. The alternating sum of the prime indices of n is given by A316524(n).
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
FORMULA
a(n) = 0 if n is a square ( A000290); otherwise a(n) = (-1)^(k-1), where k = A001222(n).
EXAMPLE
The pre-images of -1, 0, and 1, together with their prime indices, begin:
6: {1,2} 1: {} 2: {1}
10: {1,3} 4: {1,1} 3: {2}
14: {1,4} 9: {2,2} 5: {3}
15: {2,3} 16: {1,1,1,1} 7: {4}
21: {2,4} 25: {3,3} 8: {1,1,1}
22: {1,5} 11: {5}
24: {1,1,1,2} 12: {1,1,2}
26: {1,6} 13: {6}
17: {7}
18: {1,2,2}
19: {8}
20: {1,1,3}
23: {9}
27: {2,2,2}
28: {1,1,4}
29: {10}
30: {1,2,3}
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
ats[y_]:=Sum[(-1)^(i-1)*y[[i]], {i, Length[y]}];
Sign[Table[ats[primeMS[n]], {n, 100}]]
CROSSREFS
A000041 counts partitions of 2n with alternating sum 0.
A071321 is the alternating sum of prime factors.
A071322 is the reverse-alternating sum of prime factors.
A103919 counts partitions by sum and alternating sum.
A316523 is the alternating sum of prime multiplicities.
A335433 ranks separable partitions.
A335448 ranks inseparable partitions.
A344606 counts wiggly permutations of prime indices with twins.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344612 counts partitions by sum and reverse-alternating sum.
A344616 is the alternating sum of the reversed prime indices of n.
A344618 gives reverse-alternating sum of standard compositions.
Cf. A000070, A001222, A046523, A028260, A116406, A124754, A239829, A343938, A344607, A344608, A344609, A344653, A344739.
Number of divisors of n with exactly half as many prime factors as n, counting multiplicity.
+10
22
1, 0, 0, 1, 0, 2, 0, 0, 1, 2, 0, 0, 0, 2, 2, 1, 0, 0, 0, 0, 2, 2, 0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 3, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 2, 2, 2, 2, 2, 0, 4, 0, 2, 0, 1, 2, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 2, 0, 4, 2, 2, 2
COMMENTS
These divisors do not necessarily include the central divisors ( A207375), and may not themselves be central.
EXAMPLE
The a(n) divisors for selected n:
n = 1: 6: 36: 60: 210: 840: 900: 1260: 1296: 3600:
--------------------------------------------------------
1 2 4 4 6 8 12 12 16 16
3 6 6 10 12 18 18 24 24
9 10 14 20 20 20 36 36
15 15 28 30 28 54 40
21 30 45 30 81 60
35 42 50 42 90
70 75 45 100
105 63 150
70 225
105
MATHEMATICA
Table[Length[Select[Divisors[n], PrimeOmega[#]==PrimeOmega[n]/2&]], {n, 100}]
PROG
(PARI) a(n) = my(nb=bigomega(n)); sumdiv(n, d, 2*bigomega(d) == nb); \\ Michel Marcus, Aug 16 2021
(Python)
from sympy import divisors, factorint
def a(n):
npf = len(factorint(n, multiple=True))
divs = divisors(n)
return sum(2*len(factorint(d, multiple=True)) == npf for d in divs)
(Python 3.8+)
from itertools import combinations
from math import prod, comb
from sympy import factorint
if n == 1:
return 1
fs = factorint(n)
elist = list(fs.values())
q, r = divmod(sum(elist), 2)
k = len(elist)
if r:
return 0
c = 0
for i in range(k+1):
m = (-1)**i
for d in combinations(range(k), i):
t = k+q-sum(elist[j] for j in d)-i-1
if t >= 0:
c += m*comb(t, k-1)
(Python)
from sympy import factorint
from sympy.utilities.iterables import multiset_combinations
if n == 1:
return 1
fs = factorint(n, multiple=True)
q, r = divmod(len(fs), 2)
return 0 if r else len(list(multiset_combinations(fs, q))) # Chai Wah Wu, Aug 20 2021
CROSSREFS
The case of powers of 2 is A000035.
Positions of even terms are A000037.
Positions of odd terms are A000290.
The case of all divisors (not just 2) is A347042.
A001221 counts distinct prime factors.
A334997 counts chains of divisors of n by length.
Greatest divisor of n with half (rounded up) as many prime factors (counting multiplicity) as n.
+10
22
1, 2, 3, 2, 5, 3, 7, 4, 3, 5, 11, 6, 13, 7, 5, 4, 17, 9, 19, 10, 7, 11, 23, 6, 5, 13, 9, 14, 29, 15, 31, 8, 11, 17, 7, 9, 37, 19, 13, 10, 41, 21, 43, 22, 15, 23, 47, 12, 7, 25, 17, 26, 53, 9, 11, 14, 19, 29, 59, 15, 61, 31, 21, 8, 13, 33, 67, 34, 23, 35, 71
COMMENTS
Appears to contain each positive integer at least once, but only a finite number of times.
EXAMPLE
The divisors of 123456 with half bigomega are: 16, 24, 5144, 7716, so a(123456) = 7716.
MATHEMATICA
Table[Max[Select[Divisors[n], PrimeOmega[#]==Ceiling[PrimeOmega[n]/2]&]], {n, 100}]
a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]], np}, np = Length[p]; Times @@ p[[Floor[np/2] + 1;; np]]]; Array[a, 100] (* Amiram Eldar, Nov 02 2024 *)
PROG
(Python)
from sympy import divisors, factorint
def a(n):
npf = len(factorint(n, multiple=True))
for d in divisors(n)[::-1]:
if len(factorint(d, multiple=True)) == (npf+1)//2: return d
return 1
(Python 3.8+)
from math import prod
from sympy import factorint
fs = factorint(n, multiple=True)
l = len(fs)
CROSSREFS
The greatest divisor without the condition is A006530 (smallest: A020639).
The case of powers of 2 is A163403.
The smallest divisor of this type is given by A347043 (exact: A347045).
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A340387 lists numbers whose sum of prime indices is twice bigomega.
A340609 lists numbers whose maximum prime index divides bigomega.
A340610 lists numbers whose maximum prime index is divisible by bigomega.
A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).
Heinz numbers of integer partitions with integer alternating product.
+10
22
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 71, 72, 73, 74, 75, 76, 78
COMMENTS
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
Also numbers whose multiset of prime indices has integer reverse-alternating product.
EXAMPLE
The prime indices of 525 are {2,3,3,4}, with reverse-alternating product 2, so 525 is in the sequence
The prime indices of 135 are {2,2,2,3}, with reverse-alternating product 3/2, so 135 is not in the sequence.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
altprod[q_]:=Product[q[[i]]^(-1)^(i-1), {i, Length[q]}];
Select[Range[100], IntegerQ[altprod[Reverse[primeMS[#]]]]&]
CROSSREFS
Factorizations of this type are counted by A347437.
These partitions are counted by A347446.
The reverse reciprocal version A347451.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A335433 lists numbers whose prime indices are separable, complement A335448.
A347461 counts possible alternating products of partitions, reverse A347462.
Cf. A001105, A001222, A028260, A119620, A119899, A316523, A344606, A344617, A346703, A346704, A347448, A347450.
Numbers whose prime factors have a permutation with no consecutive monotone triple, i.e., no triple (..., x, y, z, ...) such that either x <= y <= z or x >= y >= z.
+10
21
1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
COMMENTS
Differs from A335433 in having all squares of primes ( A001248) and lacking 270 etc.
Also Heinz numbers of integer partitions that are either a twin (x,x) or have a wiggly permutation.
(1) The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
(2) A sequence is wiggly if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no wiggly permutations, even though it has anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).
EXAMPLE
The sequence of terms together with their prime indices begins:
1: {} 18: {1,2,2} 36: {1,1,2,2}
2: {1} 19: {8} 37: {12}
3: {2} 20: {1,1,3} 38: {1,8}
4: {1,1} 21: {2,4} 39: {2,6}
5: {3} 22: {1,5} 41: {13}
6: {1,2} 23: {9} 42: {1,2,4}
7: {4} 25: {3,3} 43: {14}
9: {2,2} 26: {1,6} 44: {1,1,5}
10: {1,3} 28: {1,1,4} 45: {2,2,3}
11: {5} 29: {10} 46: {1,9}
12: {1,1,2} 30: {1,2,3} 47: {15}
13: {6} 31: {11} 49: {4,4}
14: {1,4} 33: {2,5} 50: {1,3,3}
15: {2,3} 34: {1,7} 51: {2,7}
17: {7} 35: {3,4} 52: {1,1,6}
For example, the prime factors of 120 are (2,2,2,3,5), with the two wiggly permutations (2,3,2,5,2) and (2,5,2,3,2), so 120 is in the sequence.
MATHEMATICA
Select[Range[100], Select[Permutations[Flatten[ConstantArray@@@FactorInteger[#]]], !MatchQ[#, {___, x_, y_, z_, ___}/; x<=y<=z||x>=y>=z]&]!={}&]
CROSSREFS
Positions of nonzero terms in A344606.
These partitions are counted by A344740.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A001250 counts wiggly permutations.
A003242 counts anti-run compositions.
A344604 counts wiggly compositions with twins.
A345164 counts wiggly permutations of prime indices.
A345165 counts partitions without a wiggly permutation, ranked by A345171.
A345170 counts partitions with a wiggly permutation, ranked by A345172.
A345192 counts non-wiggly compositions.
Cf. A000070, A001222, A071321, A071322, A316523, A316524, A344605, A344614, A344616, A344652, A345163, A345166, A345167, A345173.
Numbers k such that the k-th composition in standard order is a non-alternating anti-run.
+10
21
37, 52, 69, 101, 104, 105, 133, 137, 150, 165, 180, 197, 200, 208, 209, 210, 261, 265, 274, 278, 300, 301, 308, 325, 328, 357, 360, 361, 389, 393, 400, 401, 406, 416, 417, 418, 421, 422, 436, 517, 521, 529, 530, 534, 549, 550, 556, 557, 564, 581, 600, 601, 613
COMMENTS
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).
An anti-run (separation or Carlitz composition) is a sequence with no adjacent equal parts.
EXAMPLE
The sequence of terms together with their binary indices begins:
37: (3,2,1) 210: (1,2,3,2) 400: (1,3,5)
52: (1,2,3) 261: (6,2,1) 401: (1,3,4,1)
69: (4,2,1) 265: (5,3,1) 406: (1,3,2,1,2)
101: (1,3,2,1) 274: (4,3,2) 416: (1,2,6)
104: (1,2,4) 278: (4,2,1,2) 417: (1,2,5,1)
105: (1,2,3,1) 300: (3,2,1,3) 418: (1,2,4,2)
133: (5,2,1) 301: (3,2,1,2,1) 421: (1,2,3,2,1)
137: (4,3,1) 308: (3,1,2,3) 422: (1,2,3,1,2)
150: (3,2,1,2) 325: (2,4,2,1) 436: (1,2,1,2,3)
165: (2,3,2,1) 328: (2,3,4) 517: (7,2,1)
180: (2,1,2,3) 357: (2,1,3,2,1) 521: (6,3,1)
197: (1,4,2,1) 360: (2,1,2,4) 529: (5,4,1)
200: (1,3,4) 361: (2,1,2,3,1) 530: (5,3,2)
208: (1,2,5) 389: (1,5,2,1) 534: (5,2,1,2)
209: (1,2,4,1) 393: (1,4,3,1) 549: (4,3,2,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[ Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
wigQ[y_]:=Or[Length[y]==0, Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
sepQ[y_]:=!MatchQ[y, {___, x_, x_, ___}];
Select[Range[0, 1000], sepQ[stc[#]]&&!wigQ[stc[#]]&]
CROSSREFS
These compositions are counted by A345195.
A003242 counts anti-run compositions.
A345164 counts alternating permutations of prime indices.
A345165 counts partitions w/o an alternating permutation, ranked by A345171.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A345192 counts non-alternating compositions.
Statistics of standard compositions:
- Number of distinct parts is A334028.
Classes of standard compositions:
- Weakly decreasing compositions (partitions) are A114994.
- Weakly increasing compositions (multisets) are A225620.
- Constant compositions are A272919.
- Strictly increasing compositions (sets) are A333255.
- Strictly decreasing compositions (strict partitions) are A333256.
- Alternating compositions are A345167.
- Non-Alternating compositions are A345168.
Cf. A001222, A008965, A238279, A344614, A344615, A344652, A344653, A344654, A345162, A345163, A345193, A348609, A348613.
Sum of the even-indexed parts (even bisection) of the multiset of prime indices of n.
+10
21
0, 0, 0, 1, 0, 2, 0, 1, 2, 3, 0, 1, 0, 4, 3, 2, 0, 2, 0, 1, 4, 5, 0, 3, 3, 6, 2, 1, 0, 2, 0, 2, 5, 7, 4, 3, 0, 8, 6, 4, 0, 2, 0, 1, 2, 9, 0, 2, 4, 3, 7, 1, 0, 4, 5, 5, 8, 10, 0, 4, 0, 11, 2, 3, 6, 2, 0, 1, 9, 3, 0, 3, 0, 12, 3, 1, 5, 2, 0, 2, 4, 13, 0, 5, 7, 14, 10, 6, 0, 5, 6, 1, 11, 15, 8, 4, 0, 4, 2, 4, 0, 2, 0, 7, 3
COMMENTS
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
EXAMPLE
The prime indices of 1100 are {1,1,3,3,5}, so a(1100) = 1 + 3 = 4.
The prime indices of 2100 are {1,1,2,3,3,4}, so a(2100) = 1 + 3 + 4 = 8.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Total[Last/@Partition[Append[primeMS[n], 0], 2]], {n, 100}]
PROG
(PARI) A346698(n) = if(1==n, 0, my(f=factor(n), s=0, p=0); for(k=1, #f~, while(f[k, 2], s += (p%2)*primepi(f[k, 1]); f[k, 2]--; p++)); (s)); \\ Antti Karttunen, Nov 30 2021
CROSSREFS
The even reverse version is A346699.
A029837 adds up parts of standard compositions (alternating: A124754).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A344606 counts alternating permutations of prime indices.
Smallest divisor of n with half (rounded up) as many prime factors (counting multiplicity) as n.
+10
21
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, 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, 2, 9, 8, 5, 6, 67, 4, 3, 10, 71, 8, 73, 2, 15, 4, 7, 6, 79, 8
COMMENTS
Appears to contain every positive integer at least once.
EXAMPLE
The divisors of 123456 with half bigomega are: 16, 24, 5144, 7716, so a(123456) = 16.
MATHEMATICA
Table[Min[Select[Divisors[n], PrimeOmega[#]==Ceiling[PrimeOmega[n]/2]&]], {n, 100}]
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 *)
PROG
(PARI) a(n) = my(bn=ceil(bigomega(n)/2)); fordiv(n, d, if (bigomega(d)==bn, return (d))); \\ Michel Marcus, Aug 18 2021
(Python)
from sympy import divisors, factorint
def a(n):
npf = len(factorint(n, multiple=True))
for d in divisors(n):
if len(factorint(d, multiple=True)) == (npf+1)//2: return d
return 1
(Python 3.8+)
from math import prod
from sympy import factorint
fs = factorint(n, multiple=True)
l = len(fs)
CROSSREFS
Positions of odd terms are A005408.
Positions of even terms are A005843.
The case of powers of 2 is A016116.
The smallest divisor without the condition is A020639 (greatest: A006530).
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A340387 lists numbers whose sum of prime indices is twice bigomega.
A340609 lists numbers whose maximum prime index divides bigomega.
A340610 lists numbers whose maximum prime index is divisible by bigomega.
A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).
Search completed in 0.060 seconds
|