[go: up one dir, main page]

login
Search: a335448 -id:a335448
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of alternating compositions, i.e., compositions with alternating increases and decreases, starting with either an increase or a decrease.
+10
157
1, 1, 1, 3, 4, 7, 12, 19, 29, 48, 75, 118, 186, 293, 460, 725, 1139, 1789, 2814, 4422, 6949, 10924, 17168, 26979, 42404, 66644, 104737, 164610, 258707, 406588, 639009, 1004287, 1578363, 2480606, 3898599, 6127152, 9629623, 15134213, 23785388, 37381849, 58750468
OFFSET
0,4
COMMENTS
Original name: Wiggly sums: number of sums adding to n in which terms alternately increase and decrease or vice versa.
LINKS
Edward A. Bender and E. Rodney Canfield, Locally Restricted Compositions III. Adjacent-Part Periodic Inequalities, Electronic Journal of Combinatorics 17 (2010), #R145.
FORMULA
a(n) = A025048(n) + A025049(n) - 1 = sum_k[A059881(n, k)] = sum_k[S(n, k) + T(n, k)] - 1 where if n>k>0 S(n, k) = sum_j[T(n - k, j)] over j>k and T(n, k) = sum_j[S(n - k, j)] over k>j (note reversal) and if n>0 S(n, n) = T(n, n) = 1; S(n, k) = A059882(n, k), T(n, k) = A059883(n, k). - Henry Bottomley, Feb 05 2001
a(n) ~ c * d^n, where d = 1.571630806607064114100138865739690782401305155950789062725..., c = 0.82222360450823867604750473815253345888526601460811483897... . - Vaclav Kotesovec, Sep 12 2014
a(n) = A344604(n) + 1 - n mod 2. - Gus Wiseman, Jun 17 2021
EXAMPLE
From Joerg Arndt, Dec 28 2012: (Start)
There are a(7)=19 such compositions of 7:
[ 1] + [ 1 2 1 2 1 ]
[ 2] + [ 1 2 1 3 ]
[ 3] + [ 1 3 1 2 ]
[ 4] + [ 1 4 2 ]
[ 5] + [ 1 5 1 ]
[ 6] + [ 1 6 ]
[ 7] - [ 2 1 3 1 ]
[ 8] - [ 2 1 4 ]
[ 9] + [ 2 3 2 ]
[10] + [ 2 4 1 ]
[11] + [ 2 5 ]
[12] - [ 3 1 2 1 ]
[13] - [ 3 1 3 ]
[14] + [ 3 4 ]
[15] - [ 4 1 2 ]
[16] - [ 4 3 ]
[17] - [ 5 2 ]
[18] - [ 6 1 ]
[19] 0 [ 7 ]
For A025048(7)-1=10 of these the first two parts are increasing (marked by '+'),
and for A025049(7)-1=8 the first two parts are decreasing (marked by '-').
The composition into one part is counted by both A025048 and A025049.
(End)
MAPLE
b:= proc(n, l, t) option remember; `if`(n=0, 1, add(
b(n-j, j, 1-t), j=`if`(t=1, 1..min(l-1, n), l+1..n)))
end:
a:= n-> 1+add(add(b(n-j, j, i), i=0..1), j=1..n-1):
seq(a(n), n=0..40); # Alois P. Heinz, Jan 31 2024
MATHEMATICA
wigQ[y_]:=Or[Length[y]==0, Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], wigQ]], {n, 0, 15}] (* Gus Wiseman, Jun 17 2021 *)
PROG
(PARI)
D(n, f)={my(M=matrix(n, n, j, k, k>=j), s=M[, n]); for(b=1, n, f=!f; M=matrix(n, n, j, k, if(k<j, if(f, if(k>1, M[j-k, k-1]), M[j-k, n]-M[j-k, k] ))); for(k=2, n, M[, k]+=M[, k-1]); s+=M[, n]); s~}
seq(n) = concat([1], D(n, 0) + D(n, 1) - vector(n, j, 1)) \\ Andrew Howroyd, Jan 31 2024
CROSSREFS
Dominated by A003242 (anti-run compositions), complement A261983.
The ascending case is A025048.
The descending case is A025049.
The version allowing pairs (x,x) is A344604.
These compositions are ranked by A345167, permutations A349051.
The complement is counted by A345192, ranked by A345168.
The version for patterns is A345194 (with twins: A344605).
A001250 counts alternating permutations, complement A348615.
A011782 counts compositions.
A032020 counts strict compositions.
A106356 counts compositions by number of maximal anti-runs.
A114901 counts compositions where each part is adjacent to an equal part.
A274174 counts compositions with equal parts contiguous.
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 alternating permutation, ranked by A345171.
A345170 counts partitions w/ alternating permutation, ranked by A345172.
KEYWORD
nonn
EXTENSIONS
Better name using a comment of Franklin T. Adams-Watters by Peter Luschny, Oct 31 2021
STATUS
approved
Alternating sum of the integer partition with Heinz number n.
+10
139
0, 1, 2, 0, 3, 1, 4, 1, 0, 2, 5, 2, 6, 3, 1, 0, 7, 1, 8, 3, 2, 4, 9, 1, 0, 5, 2, 4, 10, 2, 11, 1, 3, 6, 1, 0, 12, 7, 4, 2, 13, 3, 14, 5, 3, 8, 15, 2, 0, 1, 5, 6, 16, 1, 2, 3, 6, 9, 17, 1, 18, 10, 4, 0, 3, 4, 19, 7, 7, 2, 20, 1, 21, 11, 2, 8, 1, 5, 22, 3, 0, 12
OFFSET
1,3
COMMENTS
The alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i, which is equal to the number of odd parts in the conjugate partition.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.
Also the reverse-alternating sum of the prime indices of n.
LINKS
FORMULA
a(n) = A257991(A122111(n)).
A057427(a(n)) = A049240(n).
EXAMPLE
The partition (6,4,3,2,2) has Heinz number 4095 and conjugate (5,5,3,2,1,1), so a(4095) = 5.
MAPLE
a:= n-> (l-> -add(l[i]*(-1)^i, i=1..nops(l)))(sort(map(
i-> numtheory[pi](i[1])$i[2], ifactors(n)[2]), `>`)):
seq(a(n), n=1..82); # Alois P. Heinz, Jun 04 2021
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]}];
Table[ats[Reverse[primeMS[n]]], {n, 100}]
CROSSREFS
Positions of nonzeros are A000037.
Positions of 0's are A000290.
The version for prime factors is A071321 (reverse: A071322).
A version for compositions is A124754.
The version for prime multiplicities is A316523.
The reverse version is A316524, with sign A344617.
A000041 counts partitions of 2n with alternating sum 0.
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum.
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.
A344618 gives reverse-alternating sums of standard compositions.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 03 2021
STATUS
approved
Number of inseparable partitions of n; see Comments.
+10
105
0, 0, 1, 1, 2, 2, 5, 5, 8, 11, 16, 19, 28, 35, 48, 60, 79, 99, 131, 161, 205, 256, 324, 397, 498, 609, 755, 921, 1131, 1372, 1677, 2022, 2452, 2952, 3561, 4260, 5116, 6102, 7291, 8667, 10309, 12210, 14477, 17087, 20177, 23752, 27957, 32804, 38496, 45049, 52704
OFFSET
0,5
COMMENTS
Definition: a partition is separable if there is an ordering of its parts in which no consecutive parts are identical; otherwise the partition is inseparable.
A partition with k parts is inseparable if and only if there is a part whose multiplicity is greater than ceiling(k/2). - Andrew Howroyd, Jan 17 2024
LINKS
FORMULA
a(n) + A325534(n) = A000041(n) = number of partitions of n.
a(n) = Sum_{k>=1} x^(2*k-1)*(1 + x - x^(k-1))/((1-x^(k+1))*Product_{j=1..k-1} (1 - x^j)). - Andrew Howroyd, Jan 17 2024
EXAMPLE
For n=5, the partition 1+2+2 is separable as 2+1+2, and 2+1+1+1 is inseparable.
From Gus Wiseman, Jun 27 2020: (Start)
The a(2) = 2 through a(9) = 11 inseparable partitions:
11 111 22 2111 33 2221 44 333
1111 11111 222 4111 2222 3222
3111 31111 5111 6111
21111 211111 41111 22221
111111 1111111 221111 51111
311111 321111
2111111 411111
11111111 2211111
3111111
21111111
111111111
(End)
MATHEMATICA
u=Table[Length[Select[Map[Quotient[(1 + Length[#]), Max[Map[Length, Split[#]]]] &,
IntegerPartitions[nn]], # > 1 &]], {nn, 50}]
Table[PartitionsP[n] - u[[n]], {n, 1, Length[u]}]
(* Peter J. C. Moses, May 07 2019 *)
Table[Length[Select[IntegerPartitions[n], Select[Permutations[#], !MatchQ[#, {___, x_, x_, ___}]&]=={}&]], {n, 10}] (* Gus Wiseman, Jun 27 2020 *)
PROG
(PARI) seq(n) = {Vec(sum(k=1, (n+1)\2, x^(2*k-1)*(1 + x - x^(k-1))/((1-x^(k+1))*prod(j=1, k-1, 1 - x^j, 1 + O(x^(n-2*k+2)))), O(x*x^n)), -(n+1))} \\ Andrew Howroyd, Jan 17 2024
CROSSREFS
The Heinz numbers of these partitions are given by A335448.
Strict partitions are counted by A000009 and are all separable.
Anti-run compositions are counted by A003242.
Anti-run patterns are counted by A005649.
Partitions whose differences are an anti-run are A238424.
Separable partitions are counted by A325534.
Anti-run compositions are ranked by A333489.
Anti-run permutations of prime indices are counted by A335452.
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 08 2019
EXTENSIONS
a(0)=0 prepended by Andrew Howroyd, Jan 31 2024
STATUS
approved
Numbers whose multiset of prime indices is separable.
+10
101
1, 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 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, 78, 79, 82, 83
OFFSET
1,2
COMMENTS
First differs from A212167 in having 72.
Includes all squarefree numbers A005117.
A multiset is separable if it has a permutation that is an anti-run, meaning there are no adjacent equal parts.
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.
Also Heinz numbers of separable partitions (A325534). The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Also numbers that cannot be written as a product of prime numbers, each different from the last but not necessarily different from those prior to the last.
EXAMPLE
The sequence of terms together with their prime indices begins:
1: {} 20: {1,1,3} 39: {2,6}
2: {1} 21: {2,4} 41: {13}
3: {2} 22: {1,5} 42: {1,2,4}
5: {3} 23: {9} 43: {14}
6: {1,2} 26: {1,6} 44: {1,1,5}
7: {4} 28: {1,1,4} 45: {2,2,3}
10: {1,3} 29: {10} 46: {1,9}
11: {5} 30: {1,2,3} 47: {15}
12: {1,1,2} 31: {11} 50: {1,3,3}
13: {6} 33: {2,5} 51: {2,7}
14: {1,4} 34: {1,7} 52: {1,1,6}
15: {2,3} 35: {3,4} 53: {16}
17: {7} 36: {1,1,2,2} 55: {3,5}
18: {1,2,2} 37: {12} 57: {2,8}
19: {8} 38: {1,8} 58: {1,10}
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Select[Range[100], Select[Permutations[primeMS[#]], !MatchQ[#, {___, x_, x_, ___}]&]!={}&]
CROSSREFS
The version for a multiset with prescribed multiplicities is A335127.
Separable factorizations are counted by A335434.
The complement is A335448.
Separations are counted by A003242 and A335452 and ranked by A333489.
Permutations of prime indices are counted by A008480.
Inseparable partitions are counted by A325535.
Strict permutations of prime indices are counted by A335489.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 02 2020
STATUS
approved
Numbers of which it is not possible to choose a different prime factor of each prime index (with multiplicity).
+10
78
2, 4, 6, 8, 9, 10, 12, 14, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 34, 36, 38, 40, 42, 44, 45, 46, 48, 49, 50, 52, 54, 56, 57, 58, 60, 62, 63, 64, 66, 68, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98, 99, 100, 102, 104, 105, 106
OFFSET
1,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.
Includes all even numbers.
EXAMPLE
The terms together with their prime indices begin:
2: {1}
4: {1,1}
6: {1,2}
8: {1,1,1}
9: {2,2}
10: {1,3}
12: {1,1,2}
14: {1,4}
16: {1,1,1,1}
18: {1,2,2}
20: {1,1,3}
21: {2,4}
22: {1,5}
24: {1,1,1,2}
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Select[Range[100], Select[Tuples[primeMS/@primeMS[#]], UnsameQ@@#&]=={}&]
CROSSREFS
The odd case is A355535.
The case of all divisors (not just primes) is A355740, zeros of A355739.
These choices are variously counted by A355741, A355744, A355745.
A001414 adds up distinct prime divisors, counted by A001221.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A120383 lists numbers divisible by all of their prime indices.
A324850 lists numbers divisible by the product of their prime indices.
A355731 counts choices of a divisor of each prime index, firsts A355732.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 24 2022
STATUS
approved
Numbers k such that the k-th composition in standard order is alternating.
+10
75
0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 16, 17, 18, 20, 22, 24, 25, 32, 33, 34, 38, 40, 41, 44, 45, 48, 49, 50, 54, 64, 65, 66, 68, 70, 72, 76, 77, 80, 81, 82, 88, 89, 96, 97, 98, 102, 108, 109, 128, 129, 130, 132, 134, 140, 141, 144, 145, 148, 152, 153, 160, 161, 162
OFFSET
1,3
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).
EXAMPLE
The terms together with their binary indices begin:
1: (1) 25: (1,3,1) 66: (5,2)
2: (2) 32: (6) 68: (4,3)
4: (3) 33: (5,1) 70: (4,1,2)
5: (2,1) 34: (4,2) 72: (3,4)
6: (1,2) 38: (3,1,2) 76: (3,1,3)
8: (4) 40: (2,4) 77: (3,1,2,1)
9: (3,1) 41: (2,3,1) 80: (2,5)
12: (1,3) 44: (2,1,3) 81: (2,4,1)
13: (1,2,1) 45: (2,1,2,1) 82: (2,3,2)
16: (5) 48: (1,5) 88: (2,1,4)
17: (4,1) 49: (1,4,1) 89: (2,1,3,1)
18: (3,2) 50: (1,3,2) 96: (1,6)
20: (2,3) 54: (1,2,1,2) 97: (1,5,1)
22: (2,1,2) 64: (7) 98: (1,4,2)
24: (1,4) 65: (6,1) 102: (1,3,1,2)
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];
Select[Range[0, 100], wigQ@*stc]
CROSSREFS
These compositions are counted by A025047, complement A345192.
The complement is A345168.
Partitions with a permutation of this type: A345170, complement A345165.
Factorizations with a permutation of this type: A348379.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A345164 counts alternating permutations of prime indices.
A345194 counts alternating patterns, with twins A344605.
Statistics of standard compositions:
- Length is A000120.
- Constant runs are A124767.
- Heinz number is A333219.
- Number of maximal anti-runs is A333381.
- Runs-resistance is A333628.
- Number of distinct parts is A334028.
Classes of standard compositions:
- Weakly decreasing compositions (partitions) are A114994.
- Weakly increasing compositions (multisets) are A225620.
- Anti-runs are A333489.
- Non-alternating anti-runs are A345169.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 15 2021
STATUS
approved
Numbers of which it is not possible to choose a different divisor of each prime index.
+10
74
4, 8, 12, 16, 18, 20, 24, 27, 28, 32, 36, 40, 44, 48, 50, 52, 54, 56, 60, 64, 68, 72, 76, 80, 81, 84, 88, 90, 92, 96, 100, 104, 108, 112, 116, 120, 124, 125, 126, 128, 132, 135, 136, 140, 144, 148, 150, 152, 156, 160, 162, 164, 168, 172, 176, 180, 184, 188
OFFSET
1,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.
By Hall's marriage theorem, k is a term if and only if there is a sub-multiset S of the prime indices of k such that fewer than |S| numbers are divisors of a member of S. Equivalently, k is divisible by a member of A370348. - Robert Israel, Feb 15 2024
LINKS
FORMULA
We have A001221(a(n)) >= A303975(a(n)).
EXAMPLE
The terms together with their prime indices begin:
4: {1,1}
8: {1,1,1}
12: {1,1,2}
16: {1,1,1,1}
18: {1,2,2}
20: {1,1,3}
24: {1,1,1,2}
27: {2,2,2}
28: {1,1,4}
32: {1,1,1,1,1}
36: {1,1,2,2}
40: {1,1,1,3}
44: {1,1,5}
48: {1,1,1,1,2}
For example, the choices of a divisor of each prime index of 90 are: (1,1,1,1), (1,1,1,3), (1,1,2,1), (1,1,2,3), (1,2,1,1), (1,2,1,3), (1,2,2,1), (1,2,2,3). But none of these has all distinct elements, so 90 is in the sequence.
MAPLE
filter:= proc(n) uses numtheory, GraphTheory; local B, S, F, D, E, G, t, d;
F:= ifactors(n)[2];
F:= map(t -> [pi(t[1]), t[2]], F);
D:= `union`(seq(divisors(t[1]), t = F));
F:= map(proc(t) local i; seq([t[1], i], i=1..t[2]) end proc, F);
if nops(D) < nops(F) then return false fi;
E:= {seq(seq({t, d}, d=divisors(t[1])), t = F)};
S:= map(t -> convert(t, name), [op(F), op(D)]);
E:= map(e -> map(convert, e, name), E);
G:= Graph(S, E);
B:= BipartiteMatching(G);
B[1] = nops(F);
end proc:
remove(filter, [$1..200]); # Robert Israel, Feb 15 2024
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Select[Range[100], Select[Tuples[Divisors/@primeMS[#]], UnsameQ@@#&]=={}&]
CROSSREFS
Positions of 0's in A355739.
The case of just prime factors (not all divisors) is A355529, odd A355535.
The unordered case is counted by A355733, firsts A355734.
A000005 counts divisors.
A001414 adds up distinct prime divisors, counted by A001221.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A120383 lists numbers divisible by all of their prime indices.
A324850 lists numbers divisible by the product of their prime indices.
A355731 counts choices of a divisor of each prime index, firsts A355732.
A355741 chooses prime factors of prime indices, variations A355744, A355745.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 22 2022
STATUS
approved
Number of ways to choose a sequence of divisors, one of each element of the multiset of prime indices of n (row n of A112798).
+10
61
1, 1, 2, 1, 2, 2, 3, 1, 4, 2, 2, 2, 4, 3, 4, 1, 2, 4, 4, 2, 6, 2, 3, 2, 4, 4, 8, 3, 4, 4, 2, 1, 4, 2, 6, 4, 6, 4, 8, 2, 2, 6, 4, 2, 8, 3, 4, 2, 9, 4, 4, 4, 5, 8, 4, 3, 8, 4, 2, 4, 6, 2, 12, 1, 8, 4, 2, 2, 6, 6, 6, 4, 4, 6, 8, 4, 6, 8, 4, 2, 16, 2, 2, 6, 4, 4
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) = Product_{k=1..A001222(n)} A000005(A112798(n,k)).
EXAMPLE
The a(15) = 4 choices are: (1,1), (1,3), (2,1), (2,3).
The a(18) = 4 choices are: (1,1,1), (1,1,2), (1,2,1), (1,2,2).
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Times@@Length/@Divisors/@primeMS[n], {n, 100}]
CROSSREFS
Positions of 1's are A000079.
Dominated by A003963 (cf. A049820), with equality at A003586.
Positions of first appearances are A355732.
Counting distinct sequences after sorting gives A355733, firsts A355734.
Requiring the result to be weakly increasing gives A355735, firsts A355736.
Requiring the result to be relatively prime gives A355737, firsts A355738.
Requiring the choices to be distinct gives A355739, zeros A355740.
For prime divisors A355741, prime-powers A355742, weakly increasing A355745.
Choosing divisors of each of 1..n and resorting gives A355747.
An ordered version (using standard order compositions) is A355748.
A000005 counts divisors.
A001414 adds up distinct prime divisors, counted by A001221.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A120383 lists numbers divisible by all of their prime indices.
A289509 lists numbers with relatively prime prime indices.
A324850 lists numbers divisible by the product of their prime indices.
A340852 lists numbers that can be factored into divisors of bigomega.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 16 2022
STATUS
approved
Number of non-alternating compositions of n.
+10
59
0, 0, 1, 1, 4, 9, 20, 45, 99, 208, 437, 906, 1862, 3803, 7732, 15659, 31629, 63747, 128258, 257722, 517339, 1037652, 2079984, 4167325, 8346204, 16710572, 33449695, 66944254, 133959021, 268028868, 536231903, 1072737537, 2145905285, 4292486690, 8586035993, 17173742032, 34350108745, 68704342523, 137415168084
OFFSET
0,5
COMMENTS
First differs from A261983 at a(6) = 20, A261983(6) = 18.
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).
LINKS
FORMULA
a(n) = A011782(n) - A025047(n).
EXAMPLE
The a(2) = 1 through a(6) = 20 compositions:
(11) (111) (22) (113) (33)
(112) (122) (114)
(211) (221) (123)
(1111) (311) (222)
(1112) (321)
(1121) (411)
(1211) (1113)
(2111) (1122)
(11111) (1131)
(1221)
(1311)
(2112)
(2211)
(3111)
(11112)
(11121)
(11211)
(12111)
(21111)
(111111)
MATHEMATICA
wigQ[y_]:=Or[Length[y]==0, Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !wigQ[#]&]], {n, 0, 15}]
CROSSREFS
The complement is counted by A025047 (ascend: A025048, descend: A025049).
Dominates A261983 (non-anti-run compositions), ranked by A348612.
These compositions are ranked by A345168, complement A345167.
The case without twins is A348377.
The version for factorizations is A348613.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A011782 counts compositions.
A032020 counts strict compositions.
A106356 counts compositions by number of maximal anti-runs.
A114901 counts compositions where each part is adjacent to an equal part.
A274174 counts compositions with equal parts contiguous.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344604 counts alternating compositions with twins.
A344605 counts alternating patterns with twins.
A344654 counts non-twin partitions with no alternating permutation.
A345162 counts normal partitions with no alternating permutation.
A345164 counts alternating permutations of prime indices.
A345170 counts partitions w/ alternating permutation, ranked by A345172.
A345165 counts partitions w/o alternating permutation, ranked by A345171.
Patterns:
- A128761 avoiding (1,2,3) adjacent.
- A344614 avoiding (1,2,3) and (3,2,1) adjacent.
- A344615 weakly avoiding (1,2,3) adjacent.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 17 2021
STATUS
approved
Number of separations (Carlitz compositions or anti-runs) of the prime indices of n.
+10
58
1, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 0, 0, 2, 0, 1, 1, 6, 1, 0, 2, 2, 2, 2, 1, 2, 2, 0, 1, 6, 1, 1, 1, 2, 1, 0, 0, 1, 2, 1, 1, 0, 2, 0, 2, 2, 1, 6, 1, 2, 1, 0, 2, 6, 1, 1, 2, 6, 1, 1, 1, 2, 1, 1, 2, 6, 1, 0, 0, 2, 1, 6, 2, 2, 2
OFFSET
1,6
COMMENTS
The first term that is not a factorial number is a(180) = 12.
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.
A separation (or Carlitz composition) of a multiset is a permutation with no adjacent equal parts.
a(n) depends only on the prime signature of n. - Andrew Howroyd, Feb 03 2021
LINKS
EXAMPLE
The a(n) separations for n = 2, 6, 30, 180:
(1) (12) (123) (12123)
(21) (132) (12132)
(213) (12312)
(231) (12321)
(312) (13212)
(321) (21213)
(21231)
(21312)
(21321)
(23121)
(31212)
(32121)
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Length[Select[Permutations[primeMS[n]], !MatchQ[#, {___, x_, x_, ___}]&]], {n, 100}]
PROG
(PARI)
F(i, j, r, t) = {sum(k=max(0, i-j), min(min(i, t), (i-j+t)\2), binomial(i, k)*binomial(r-i+1, t+i-j-2*k)*binomial(t-1, k-i+j))}
count(sig)={my(s=vecsum(sig), r=0, v=[1]); for(p=1, #sig, my(t=sig[p]); v=vector(s-r-t+1, j, sum(i=1, #v, v[i]*F(i-1, j-1, r, t))); r += t); v[1]}
a(n)={count(factor(n)[, 2])} \\ Andrew Howroyd, Feb 03 2021
CROSSREFS
Separations are counted by A003242 and ranked by A333489.
Patterns are counted by A000670 and ranked by A333217.
Permutations of prime indices are counted by A008480.
Inseparable partitions are counted by A325535 and ranked by A335448.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 21 2020
STATUS
approved

Search completed in 0.071 seconds