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.

Previous Showing 11-20 of 25 results. Next

A351004 Alternately constant partitions. Number of integer partitions y of n such that y_i = y_{i+1} for all odd i.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 4, 7, 7, 10, 9, 15, 13, 21, 19, 28, 26, 40, 35, 54, 49, 72, 64, 97, 87, 128, 115, 167, 151, 220, 195, 284, 256, 366, 328, 469, 421, 598, 537, 757, 682, 959, 859, 1204, 1085, 1507, 1354, 1880, 1694, 2338, 2104, 2892, 2609, 3574, 3218, 4394
Offset: 0

Views

Author

Gus Wiseman, Jan 31 2022

Keywords

Comments

These are partitions of n with all even multiplicities (or run-lengths), except possibly the last.

Examples

			The a(1) = 1 through a(9) = 7 partitions:
  1  2   3    4     5      6       7        8         9
     11  111  22    221    33      331      44        333
              1111  11111  222     22111    332       441
                           2211    1111111  2222      22221
                           111111           3311      33111
                                            221111    2211111
                                            11111111  111111111
		

Crossrefs

The ordered version (compositions) is A016116.
The even-length case is A035363.
A reverse version is A096441, both A349060.
The version for unequal instead of equal is A122129, even-length A351008.
The version for even instead of odd indices is A351003, even-length A351012.
The strict version is A351005, opposite A351006, even-length A035457.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Table[#[[i]]==#[[i+1]],{i,1,Length[#]-1,2}]&]],{n,0,30}]

A349797 Number of non-weakly alternating permutations of the multiset of prime factors of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Dec 24 2021

Keywords

Comments

First differs from 2 * A326291 at a(90) = 4, A326291(90) = 3.
The first odd term is a(144) = 7, whose non-weakly alternating permutations are shown in the example below.
We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. Then a sequence is alternating in the sense of A025047 iff it is a weakly alternating anti-run.
For n > 1, the multiset of prime factors of n is row n of A027746. The prime indices A112798 can also be used.

Examples

			The following are the weakly alternating permutations for selected n.
n = 30    60     72      120     144      180
   ---------------------------------------------
    235   2235   22332   22235   222332   22353
    532   2352   23223   22352   223223   23235
          2532   23322   22532   223322   23325
          3225   32232   23225   232232   23523
          5223           23522   233222   23532
          5322           25223   322223   25323
                         25322   322322   32235
                         32252            32253
                         52232            32352
                         53222            32532
                                          33225
                                          35223
                                          35322
                                          52233
                                          52332
                                          53223
                                          53232
		

Crossrefs

Counting all permutations of prime factors gives A008480.
Compositions not of this type are counted by A349052/A129852/A129853.
Compositions of this type are counted by A349053, ranked by A349057.
The complement is counted by A349056.
Partitions of this type are counted by A349061, complement A349060.
The version counting patterns is A350138, complement A349058.
The version counting ordered factorizations is A350139, complement A349059.
The strong case is counted by A350251, complement A345164.
Positions of nonzero terms are A350353.
A001250 counts alternating permutations, complement A348615.
A025047 = alternating compositions, ranked by A345167, complement A345192.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A071321 gives the alternating sum of prime factors, reverse A071322.
A335452 counts anti-run permutations of prime factors, complement A336107.
A345165 counts partitions w/o an alternating permutation, ranked by A345171.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A348379 counts factorizations with an alternating permutation.

Programs

  • Mathematica
    whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}];
    Table[Length[Select[Permutations[Flatten[ConstantArray@@@ FactorInteger[n]]], !whkQ[#]&&!whkQ[-#]&]],{n,100}]

Formula

a(n) = A008480(n) - A349056(n).

A350252 Number of non-alternating patterns of length n.

Original entry on oeis.org

0, 0, 1, 7, 53, 439, 4121, 43675, 519249, 6867463, 100228877, 1602238783, 27866817297, 524175098299, 10606844137009, 229807953097903, 5308671596791901, 130261745042452855, 3383732450013895721, 92770140175473602755, 2677110186541556215233
Offset: 0

Views

Author

Gus Wiseman, Jan 13 2022

Keywords

Comments

We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217.
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 alternating pattern is necessarily an anti-run (A005649).
Conjecture: Also the number of non-weakly up/down (or down/up) patterns of length n. For example:
- The a(3) = 7 non-weakly up/down patterns:
(121), (122), (123), (132), (221), (231), (321)
- The a(3) = 7 non-weakly down/up patterns:
(112), (123), (211), (212), (213), (312), (321)
- The a(3) = 7 non-alternating patterns (see example for more):
(111), (112), (122), (123), (211), (221), (321)

Examples

			The a(2) = 1 and a(3) = 7 non-alternating patterns:
  (1,1)  (1,1,1)
         (1,1,2)
         (1,2,2)
         (1,2,3)
         (2,1,1)
         (2,2,1)
         (3,2,1)
The a(4) = 53 non-alternating patterns:
  2112   3124   4123   1112   2134   1234   3112   2113   1123
  2211   3214   4213   1211   2314   1243   3123   2123   1213
  2212   3412   4312   1212   2341   1324   3211   2213   1223
         3421   4321   1221   2413   1342   3212   2311   1231
                       1222   2431   1423   3213   2312   1232
                                     1432   3312   2313   1233
                                            3321   2321   1312
                                                   2331   1321
                                                          1322
                                                          1323
                                                          1332
		

Crossrefs

The unordered version is A122746.
The version for compositions is A345192, ranked by A345168, weak A349053.
The complement is counted by A345194, weak A349058.
The version for factorizations is A348613, complement A348610, weak A350139.
The strict case (permutations) is A348615, complement A001250.
The weak version for partitions is A349061, complement A349060.
The weak version for perms of prime indices is A349797, complement A349056.
The weak version is A350138.
The version for perms of prime indices is A350251, complement A345164.
A000670 = patterns (ranked by A333217).
A003242 = anti-run compositions, complement A261983, ranked by A333489.
A005649 = anti-run patterns, complement A069321.
A019536 = necklace patterns.
A025047/A129852/A129853 = alternating compositions, ranked by A345167.
A226316 = patterns avoiding (1,2,3), weakly A052709, complement A335515.
A345163 = normal partitions w/ alternating permutation, complement A345162.
A345170 = partitions w/ alternating permutation, complement A345165.
A349055 = normal multisets w/ alternating permutation, complement A349050.

Programs

  • Mathematica
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&& Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[Join@@Permutations/@allnorm[n],!wigQ[#]&]],{n,0,6}]

Formula

a(n) = A000670(n) - A345194(n).

Extensions

Terms a(9) and beyond from Andrew Howroyd, Feb 04 2022

A349795 Number of non-strict integer partitions of n that are constant or whose part multiplicities, except possibly the first and last, are all even.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 7, 9, 14, 17, 24, 29, 39, 46, 61, 69, 90, 103, 131, 147, 185, 207, 259, 286, 355, 391, 482, 528, 644, 706, 858, 933, 1129, 1228, 1477, 1597, 1916, 2072, 2473, 2668, 3168, 3415, 4047, 4347, 5133, 5514, 6488, 6952, 8162, 8738, 10226, 10936
Offset: 0

Views

Author

Gus Wiseman, Dec 06 2021

Keywords

Comments

Also the number of weakly alternating non-strict integer partitions of n, where we define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. This sequence looks at the somewhat degenerate case where no strict increases are allowed. Equivalently, these are partitions that are weakly alternating but not strongly alternating.

Examples

			The a(2) = 1 through a(8) = 14 partitions:
  (11)  (111)  (22)    (221)    (33)      (322)      (44)
               (211)   (311)    (222)     (331)      (332)
               (1111)  (2111)   (411)     (511)      (422)
                       (11111)  (2211)    (2221)     (611)
                                (3111)    (4111)     (2222)
                                (21111)   (22111)    (3221)
                                (111111)  (31111)    (3311)
                                          (211111)   (5111)
                                          (1111111)  (22211)
                                                     (41111)
                                                     (221111)
                                                     (311111)
                                                     (2111111)
                                                     (11111111)
		

Crossrefs

This is the restriction of A349060 to non-strict partitions.
The complement in non-strict partitions is A349796.
Permutations of prime factors of this type are counted by A349798.
The ordered version (compositions) is A349800, ranked by A349799.
These partitions are ranked by A350137.
A000041 counts integer partitions, non-strict A047967.
A001250 counts alternating permutations, complement A348615.
A025047 counts alternating compositions, also A025048 and A025049.
A096441 counts weakly alternating 0-appended partitions.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A349053 counts non-weakly alternating compositions, complement A349052.
A349061 counts non-weakly alternating partitions, ranked by A349794.
A349801 counts non-alternating partitions.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],!UnsameQ@@#&&(SameQ@@#||And@@EvenQ/@Take[Length/@Split[#],{2,-2}])&]],{n,0,30}]

Formula

a(n > 0) = A349060(n) - A065033(n) = A349060(n) - floor(n/2).
a(n) = A047967(n) - A349796(n).

A349796 Number of non-strict integer partitions of n with at least one part of odd multiplicity that is not the first or last.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 8, 15, 23, 37, 52, 80, 109, 156, 208, 289, 378, 509, 654, 865, 1098, 1425, 1789, 2290, 2852, 3603, 4450, 5569, 6830, 8467, 10321, 12701, 15393, 18805, 22678, 27535, 33057, 39908, 47701, 57304, 68226, 81572, 96766, 115212, 136201
Offset: 0

Views

Author

Gus Wiseman, Dec 25 2021

Keywords

Comments

Also the number of non-weakly alternating non-strict integer partitions of n, where we define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. This sequence involves the somewhat degenerate case where no strict increases are allowed.

Examples

			The a(7) = 1 through a(11) = 15 partitions:
  (3211)  (4211)   (3321)    (5311)     (4322)
          (32111)  (4311)    (6211)     (4421)
                   (5211)    (32221)    (5411)
                   (42111)   (33211)    (6311)
                   (321111)  (43111)    (7211)
                             (52111)    (42221)
                             (421111)   (43211)
                             (3211111)  (53111)
                                        (62111)
                                        (322211)
                                        (332111)
                                        (431111)
                                        (521111)
                                        (4211111)
                                        (32111111)
		

Crossrefs

Counting all non-strict partitions gives A047967.
Signatures of this type are counted by A274230, complement A027383.
The strict instead of non-strict version is A347548, ranked by A350352.
The version for compositions allowing strict is A349053, ranked by A349057.
Allowing strict partitions gives A349061, complement A349060.
The complement in non-strict partitions is A349795.
These partitions are ranked by A350140 = A349794 \ A005117.
A000041 = integer partitions, strict A000009.
A001250 = alternating permutations, complement A348615.
A003242 = Carlitz (anti-run) compositions.
A025047 = alternating compositions, ranked by A345167.
A025048/A025049 = directed alternating compositions.
A096441 = weakly alternating 0-appended partitions.
A345170 = partitions w/ an alternating permutation, ranked by A345172.
A349052 = weakly alternating compositions.
A349056 = weakly alternating permutations of prime indices.
A349798 = weakly but not strongly alternating permutations of prime indices.

Programs

  • Mathematica
    whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}];
    Table[Length[Select[IntegerPartitions[n],!whkQ[#]&&!whkQ[-#]&&!UnsameQ@@#&]],{n,0,30}]

Formula

a(n) = A349061(n) - A347548(n).

A349798 Number of weakly alternating ordered prime factorizations of n with at least two adjacent equal parts.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 2, 0, 0, 0, 1, 0, 2, 0, 2, 0, 0, 0, 4, 1, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 2, 2, 0, 0, 5, 1, 2, 0, 2, 0, 4, 0, 4, 0, 0, 0, 2, 0, 0, 2, 1, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 2, 2, 0, 0, 0, 5, 1, 0, 0, 2, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Dec 14 2021

Keywords

Comments

We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. This sequence counts permutations of prime factors that are weakly but not strongly alternating. Alternating permutations of multisets are a generalization of alternating or up-down permutations of {1..n}.

Examples

			Using prime indices instead of factors, the a(n) ordered prime factorizations for selected n are:
n = 4    12    24     48      90     120     192       240      270
   ------------------------------------------------------------------
    11   112   1112   11112   1223   11132   1111112   111132   12232
         211   1121   11121   1322   11213   1111121   111213   13222
               1211   11211   2213   11312   1111211   111312   21223
               2111   12111   2231   21113   1112111   112131   21322
                      21111   3122   21311   1121111   113121   22132
                              3221   23111   1211111   121113   22213
                                     31112   2111111   121311   22231
                                     31211             131112   22312
                                                       131211   23122
                                                       211131   23221
                                                       213111   31222
                                                       231111   32212
                                                       311121
                                                       312111
		

Crossrefs

This is the weakly but not strictly alternating case of A008480.
Including alternating (in fact, anti-run) permutations gives A349056.
These partitions are counted by A349795, ranked by A350137.
A complementary version is A349796, ranked by A350140.
The version for compositions is A349800, ranked by A349799.
A001250 = alternating permutations, ranked by A349051, complement A348615.
A025047/A025048/A025049 = alternating compositions, ranked by A345167.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A335452 = anti-run ordered prime factorizations.
A344652 = ordered prime factorizations w/o weakly increasing triples.
A345164 = alternating ordered prime factorizations, with twins A344606.
A345194 = alternating patterns, with twins A344605.
A349052/A129852/A129853 = weakly alternating compositions.
A349053 = non-weakly alternating compositions, ranked by A349057.
A349060 = weakly alternating partitions, complement A349061.
A349797 = non-weakly alternating ordered prime factorizations.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}];
    Table[Length[Select[Permutations[primeMS[n]],(whkQ[#]||whkQ[-#])&&MatchQ[#,{_,x_,x_,_}]&]],{n,100}]

A349799 Numbers k such that the k-th composition in standard order is weakly alternating but has at least two adjacent equal parts.

Original entry on oeis.org

3, 7, 10, 11, 14, 15, 19, 21, 23, 26, 27, 28, 29, 30, 31, 35, 36, 39, 42, 43, 47, 51, 55, 56, 57, 58, 59, 60, 61, 62, 63, 67, 71, 73, 74, 79, 83, 84, 85, 86, 87, 90, 91, 94, 95, 99, 100, 103, 106, 111, 112, 113, 114, 115, 118, 119, 120, 121, 122, 123, 124, 125
Offset: 1

Views

Author

Gus Wiseman, Dec 15 2021

Keywords

Comments

We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either.
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.
This sequence ranks compositions that are weakly but not strongly alternating.

Examples

			The terms and corresponding compositions begin:
   3: (1,1)
   7: (1,1,1)
  10: (2,2)
  11: (2,1,1)
  14: (1,1,2)
  15: (1,1,1,1)
  19: (3,1,1)
  21: (2,2,1)
  23: (2,1,1,1)
  26: (1,2,2)
  27: (1,2,1,1)
  28: (1,1,3)
  29: (1,1,2,1)
  30: (1,1,1,2)
  31: (1,1,1,1,1)
		

Crossrefs

Partitions of this type are counted by A349795, ranked by A350137.
Permutations of prime indices of this type are counted by A349798.
These compositions are counted by A349800.
A001250 = alternating permutations, ranked by A349051, complement A348615.
A003242 = Carlitz (anti-run) compositions, ranked by A333489.
A025047/A025048/A025049 = alternating compositions, ranked by A345167.
A261983 = non-anti-run compositions, ranked by A348612.
A345164 = alternating permutations of prime indices, with twins A344606.
A345165 = partitions without an alternating permutation, ranked by A345171.
A345170 = partitions with an alternating permutation, ranked by A345172.
A345166 = separable partitions with no alternations, ranked by A345173.
A345192 = non-alternating compositions, ranked by A345168.
A345195 = non-alternating anti-run compositions, ranked by A345169.
A349052/A129852/A129853 = weakly alternating compositions.
A349053 = non-weakly alternating compositions, ranked by A349057.
A349056 = weak alternations of prime indices, complement A349797.
A349060 = weak alternations of partitions, complement A349061.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[ Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}];
    Select[Range[0,100],(whkQ[stc[#]]||whkQ[-stc[#]])&&MatchQ[stc[#],{_,x_,x_,_}]&]

Formula

A349794 Numbers whose prime signature has an odd term other than the first or last.

Original entry on oeis.org

30, 42, 60, 66, 70, 78, 84, 102, 105, 110, 114, 120, 130, 132, 138, 140, 150, 154, 156, 165, 168, 170, 174, 182, 186, 190, 195, 204, 210, 220, 222, 228, 230, 231, 238, 240, 246, 255, 258, 260, 264, 266, 270, 273, 276, 280, 282, 285, 286, 290, 294, 300, 308
Offset: 1

Views

Author

Gus Wiseman, Dec 06 2021

Keywords

Comments

A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization.
Also numbers whose multiset of prime factors is not weakly alternating, where we define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. This sequence looks at the somewhat degenerate case where no strict decreases are allowed.

Examples

			The terms and their prime indices begin:
   30: {1,2,3}
   42: {1,2,4}
   60: {1,1,2,3}
   66: {1,2,5}
   70: {1,3,4}
   78: {1,2,6}
   84: {1,1,2,4}
  102: {1,2,7}
  105: {2,3,4}
  110: {1,3,5}
  114: {1,2,8}
  120: {1,1,1,2,3}
  130: {1,3,6}
  132: {1,1,2,5}
  138: {1,2,9}
		

Crossrefs

The complement for compositions is A025047, ranked by A345167.
Signatures of this type are counted by A274230, complement A027383.
The strong case is A289553, complement A167171.
The strong case for compositions is A345192, ranked by A345168.
The version for compositions is A349053, ranked by A349057.
These partitions are counted by A349061, complement A349060, strong A349801.
The non-strict case is counted by A349795.
A001250 counts alternating permutations, complement A348615.
A096441 counts weakly alternating partitions if 0 is appended.
A345164 counts alternating permutations of prime indices, weak A349056.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A349052 counts weakly alternating compositions.
A349059 counts weakly alternating ordered factorizations, strong A348610.

Programs

  • Mathematica
    Select[Range[100],PrimeNu[#]>1&&!And@@EvenQ/@Take[Last/@FactorInteger[#],{2,-2}]&]

A350138 Number of non-weakly alternating patterns of length n.

Original entry on oeis.org

0, 0, 0, 2, 32, 338, 3560, 40058, 492664, 6647666, 98210192, 1581844994, 27642067000, 521491848218, 10572345303576, 229332715217954, 5301688511602448, 130152723055769810, 3381930236770946120, 92738693031618794378, 2676532576838728227352
Offset: 0

Views

Author

Gus Wiseman, Dec 24 2021

Keywords

Comments

We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217.
We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either.
Conjecture: The directed cases, which count non-weakly up/down or non-weakly down/up patterns, are both equal to the strong case: A350252.

Examples

			The a(4) = 32 patterns:
  (1,1,2,3)  (2,1,1,2)  (3,1,1,2)  (4,1,2,3)
  (1,2,2,1)  (2,1,1,3)  (3,1,2,3)  (4,2,1,3)
  (1,2,3,1)  (2,1,2,3)  (3,1,2,4)  (4,3,1,2)
  (1,2,3,2)  (2,1,3,4)  (3,2,1,1)  (4,3,2,1)
  (1,2,3,3)  (2,3,2,1)  (3,2,1,2)
  (1,2,3,4)  (2,3,3,1)  (3,2,1,3)
  (1,2,4,3)  (2,3,4,1)  (3,2,1,4)
  (1,3,2,1)  (2,4,3,1)  (3,3,2,1)
  (1,3,3,2)             (3,4,2,1)
  (1,3,4,2)
  (1,4,3,2)
		

Crossrefs

The unordered version is A274230, complement A052955.
The strong case of compositions is A345192, ranked by A345168.
The strict case is A348615, complement A001250.
For compositions we have A349053, complement A349052, ranked by A349057.
The complement is counted by A349058.
The version for partitions is A349061, complement A349060.
The version for permutations of prime indices: A349797, complement A349056.
The version for ordered factorizations is A350139, complement A349059.
The strong case is A350252, complement A345194. Also the directed case?
A003242 = Carlitz compositions, complement A261983, ranked by A333489.
A005649 = anti-run patterns, complement A069321.
A025047/A129852/A129853 = alternating compositions, ranked by A345167.
A345163 = normal partitions w/ alternating permutation, complement A345162.
A345170 = partitions w/ alternating permutation, complement A345165.
A349055 = normal multisets w/ alternating permutation, complement A349050.

Programs

  • Mathematica
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}];
    Table[Length[Select[Join@@Permutations/@allnorm[n],!whkQ[#]&&!whkQ[-#]&]],{n,0,6}]
  • PARI
    R(n,k)={my(v=vector(k,i,1), u=vector(n)); for(r=1, n, if(r%2==0, my(s=v[k]); forstep(i=k, 2, -1, v[i] = s - v[i-1]); v[1] = s); for(i=2, k, v[i] += v[i-1]); u[r]=v[k]); u}
    seq(n)= {concat([0], vector(n,i,1) + sum(k=1, n, (vector(n,i,k^i) - 2*R(n, k))*sum(r=k, n, binomial(r, k)*(-1)^(r-k)) ) )} \\ Andrew Howroyd, Jan 13 2024

Formula

a(n) = A000670(n) - A349058(n).

Extensions

a(9) onwards from Andrew Howroyd, Jan 13 2024

A349801 Number of integer partitions of n into three or more parts or into two equal parts.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 8, 11, 18, 25, 37, 50, 71, 94, 128, 168, 223, 288, 376, 480, 617, 781, 991, 1243, 1563, 1945, 2423, 2996, 3704, 4550, 5589, 6826, 8333, 10126, 12293, 14865, 17959, 21618, 25996, 31165, 37318, 44562, 53153, 63239, 75153, 89111, 105535, 124730
Offset: 0

Views

Author

Gus Wiseman, Dec 23 2021

Keywords

Comments

This sequence arose as the following degenerate case. If we define a sequence to be alternating if it is alternately strictly increasing and strictly decreasing, starting with either, then a(n) is the number of non-alternating integer partitions of n. Under this interpretation:
- The non-strict case is A047967, weak A349796, weak complement A349795.
- The complement is counted by A065033(n) = ceiling(n/2) for n > 0.
- These partitions are ranked by A289553 \ {1}, complement A167171 \/ {1}.
- The version for compositions is A345192, ranked by A345168.
- The weak version for compositions is A349053, ranked by A349057.
- The weak version is A349061, complement A349060, ranked by A349794.

Examples

			The a(2) = 1 through a(7) = 11 partitions:
  (11)  (111)  (22)    (221)    (33)      (322)
               (211)   (311)    (222)     (331)
               (1111)  (2111)   (321)     (421)
                       (11111)  (411)     (511)
                                (2211)    (2221)
                                (3111)    (3211)
                                (21111)   (4111)
                                (111111)  (22111)
                                          (31111)
                                          (211111)
                                          (1111111)
		

Crossrefs

A000041 counts partitions, ordered A011782.
A001250 counts alternating permutations, complement A348615.
A004250 counts partitions into three or more parts, strict A347548.
A025047/A025048/A025049 count alternating compositions, ranked by A345167.
A096441 counts weakly alternating 0-appended partitions.
A345165 counts partitions w/ no alternating permutation, complement A345170.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],MatchQ[#,{x_,x_}|{,,__}]&]],{n,0,10}]

Formula

a(1) = 0; a(n > 0) = A000041(n) - ceiling(n/2).
Previous Showing 11-20 of 25 results. Next