[go: up one dir, main page]

login
Search: a335448 -id:a335448
     Sort: relevance | references | number | modified | created      Format: long | short | data
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
OFFSET
1,1
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.
FORMULA
Equals A345171 /\ A335433.
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.
A000041 counts integer partitions.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A025047 counts alternating compositions, ascend A025048, descend A025049.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
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.
A345192 counts non-alternating compositions, without twins A348377.
A348379 counts factorizations with an alternating permutation.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 13 2021
STATUS
approved
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
OFFSET
1,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.
FORMULA
a(n) = A056239(n) - A346698(n).
a(n) = A316524(n) + A346698(n).
a(n odd omega) = A346699(n).
a(n even omega) = A346700(n).
A344616(n) = A346699(n) - A346700(n).
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).
Subtracting the even version gives A316524 (reverse: A344616).
The even version is A346698.
The reverse version is A346699.
The even reverse version is A346700.
A000120 and A080791 count binary digits 1 and 0, with difference A145037.
A000302 counts compositions with odd alternating sum, ranked by A053738.
A001414 adds up prime factors, row sums of A027746.
A029837 adds up parts of standard compositions (alternating: A124754).
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344606 counts alternating permutations of prime indices.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 01 2021
STATUS
approved
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
OFFSET
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).
a(n) = a(A046523(n)). - Antti Karttunen, May 06 2022
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}]]
PROG
(PARI) A344617(n) = ((!issquare(n)) * ((-1)^(1+bigomega(n)))); \\ Antti Karttunen, May 06 2022
CROSSREFS
Positions of nonzeros are A000037.
Positions of 0's are A000290.
Positions of 1's are A026424.
The absolute value is A049240.
Positions of -1's are A119899.
a(n) is the sign of A316524(n).
A000041 counts partitions of 2n with alternating sum 0.
A056239 adds up prime indices, row sums of A112798.
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.
KEYWORD
sign
AUTHOR
Gus Wiseman, Jun 03 2021
EXTENSIONS
More terms from Antti Karttunen, May 06 2022
STATUS
approved
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
OFFSET
1,6
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)
print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Aug 17 2021
(Python 3.8+)
from itertools import combinations
from math import prod, comb
from sympy import factorint
def A345957(n):
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)
return c # Chai Wah Wu, Aug 20 2021
(Python)
from sympy import factorint
from sympy.utilities.iterables import multiset_combinations
def A345957(n):
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.
Positions of 0's are A026424.
Positions of 1's are A056798.
The rounded version is A096825.
The case of all divisors (not just 2) is A347042.
The smallest of these divisors is A347045 (rounded: A347043).
The greatest of these divisors is A347046 (rounded: A347044).
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors.
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A334997 counts chains of divisors of n by length.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 16 2021
STATUS
approved
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
OFFSET
1,2
COMMENTS
Appears to contain each positive integer at least once, but only a finite number of times.
LINKS
FORMULA
a(n) = Product_{k=floor(A001222(n)/2)+1..A001222(n)} A027746(n,k). - Amiram Eldar, Nov 02 2024
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
print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Aug 18 2021
(Python 3.8+)
from math import prod
from sympy import factorint
def A347044(n):
fs = factorint(n, multiple=True)
l = len(fs)
return prod(fs[l//2:]) # Chai Wah Wu, Aug 20 2021
CROSSREFS
The greatest divisor without the condition is A006530 (smallest: A020639).
Divisors of this type are counted by A096825 (exact: A345957).
The case of powers of 2 is A163403.
The smallest divisor of this type is given by A347043 (exact: A347045).
The exact version is A347046.
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A038548 counts inferior (or superior) divisors (strict: A056924).
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors (min: A033676, max: A033677).
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).
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 16 2021
STATUS
approved
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
OFFSET
1,2
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
The reciprocal version is A028982.
Allowing any alternating product > 1 gives A028983, reverse A347465.
Factorizations of this type are counted by A347437.
These partitions are counted by A347446.
The reverse reciprocal version A347451.
The odd-length case is A347453.
The reverse version is A347454.
The complement is A347455.
A056239 adds up prime indices, row sums of A112798.
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 26 2021
STATUS
approved
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
OFFSET
1,2
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).
FORMULA
Union of A345172 (wiggly) and A001248 (squares of primes).
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.
The complement is A344653, counted by A344654.
These partitions are counted by A344740.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A001248 lists squares of primes.
A001250 counts wiggly permutations.
A003242 counts anti-run compositions.
A011782 counts compositions.
A025047 counts wiggly compositions (ascend: A025048, descend: A025049).
A056239 adds up prime indices, row sums of A112798.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 12 2021
STATUS
approved
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
OFFSET
1,1
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.
FORMULA
Intersection of A345168 (non-alternating) and A333489 (anti-run).
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
A version counting partitions is A345166, ranked by A345173.
These compositions are counted by A345195.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A005649 counts anti-run patterns.
A025047 counts alternating or wiggly compositions, also A025048, A025049.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
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.
A345194 counts alternating patterns (with twins: A344605).
Statistics of standard compositions:
- Length is A000120.
- Constant runs are A124767.
- Heinz number is A333219.
- Anti-runs are A333381.
- Runs-resistance is A333628.
- Number of distinct parts is A334028.
- Non-anti-runs are A348612.
Classes of standard compositions:
- Weakly decreasing compositions (partitions) are A114994.
- Weakly increasing compositions (multisets) are A225620.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Strictly increasing compositions (sets) are A333255.
- Strictly decreasing compositions (strict partitions) are A333256.
- Anti-runs are A333489.
- Alternating compositions are A345167.
- Non-Alternating compositions are A345168.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 15 2021
STATUS
approved
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
OFFSET
1,6
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.
LINKS
FORMULA
a(n) = A056239(n) - A346697(n).
a(n) = A346697(n) - A316524(n).
a(n even omega) = A346699(n).
a(n odd omega) = A346700(n).
A344616(n) = A346699(n) - A346700(n).
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
Subtracting from the odd version gives A316524 (reverse: A344616).
The version for standard compositions is A346633 (odd: A209281(n+1)).
The odd version is A346697.
The even reverse version is A346699.
The reverse version is A346700.
A000120 and A080791 count binary digits 1 and 0, with difference A145037.
A001414 adds up prime factors, row-sums of A027746.
A029837 adds up parts of standard compositions (alternating: A124754).
A056239 adds up prime indices, row-sums of A112798.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344606 counts alternating permutations of prime indices.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 01 2021
EXTENSIONS
Data section extended up to 105 terms by Antti Karttunen, Nov 30 2021
STATUS
approved
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
OFFSET
1,2
COMMENTS
Appears to contain every positive integer at least once.
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
LINKS
FORMULA
a(n) = Product_{k=1..ceiling(A001222(n)/2)} A027746(n,k). - Amiram Eldar, Nov 02 2024
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
print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Aug 18 2021
(Python 3.8+)
from math import prod
from sympy import factorint
def A347043(n):
fs = factorint(n, multiple=True)
l = len(fs)
return prod(fs[:(l+1)//2]) # Chai Wah Wu, Aug 20 2021
CROSSREFS
Positions of 2's are A001747.
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).
These divisors are counted by A096825 (exact: A345957).
The greatest of these divisors is A347044 (exact: A347046).
The exact version is A347045.
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors (min: A033676, max: A033677).
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).
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 15 2021
STATUS
approved

Search completed in 0.060 seconds