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.

Showing 1-10 of 11 results. Next

A349057 Numbers k such that the k-th composition in standard order is not weakly alternating.

Original entry on oeis.org

37, 46, 52, 53, 69, 75, 78, 92, 93, 101, 104, 105, 107, 110, 116, 117, 133, 137, 139, 142, 150, 151, 156, 157, 165, 174, 180, 181, 184, 185, 186, 187, 190, 197, 200, 201, 203, 206, 208, 209, 210, 211, 214, 215, 220, 221, 229, 232, 233, 235, 238, 244, 245, 261
Offset: 1

Views

Author

Gus Wiseman, Dec 04 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.

Examples

			The terms and corresponding compositions begin:
   37: (3,2,1)
   46: (2,1,1,2)
   52: (1,2,3)
   53: (1,2,2,1)
   69: (4,2,1)
   75: (3,2,1,1)
   78: (3,1,1,2)
   92: (2,1,1,3)
   93: (2,1,1,2,1)
  101: (1,3,2,1)
  104: (1,2,4)
  105: (1,2,3,1)
  107: (1,2,2,1,1)
  110: (1,2,1,1,2)
  116: (1,1,2,3)
  117: (1,1,2,2,1)
		

Crossrefs

The strong case is A345168, complement A345167, counted by A345192.
The strong anti-run case is A345169, counted by A345195.
Including all non-anti-runs gives A348612, complement A333489.
These compositions are counted by A349053, complement A349052.
The directed cases are counted by A129852 (incr.) and A129853 (decr.).
The complement for patterns is A349058, strong A345194.
The complement for ordered factorizations is A349059, strong A348610.
Partitions of this type are counted by A349061, complement A349060.
Partitions of this type are ranked by A349794.
Non-strict partitions of this type are counted by A349796.
Permutations of prime indices of this type are counted by A349797.
A001250 counts alternating permutations, complement A348615.
A003242 counts Carlitz (anti-run) compositions, complement A261983.
A011782 counts compositions.
A025047 counts alternating/wiggly compositions, directed A025048, A025049.
A345164 counts alternating permutations of prime indices, weak A349056.
A345165 counts partitions w/o an alternating permutation, ranked by A345171.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A349054 counts strict alternating compositions.

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[#]]&]

A349060 Number of 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

1, 1, 2, 3, 5, 7, 10, 13, 18, 22, 29, 35, 45, 53, 68, 77, 98, 112, 140, 157, 195, 218, 270, 298, 367, 404, 495, 542, 658, 721, 873, 949, 1145, 1245, 1494, 1615, 1934, 2091, 2492, 2688, 3188, 3436, 4068, 4369, 5155, 5537, 6511, 6976, 8186, 8763, 10251, 10962
Offset: 0

Views

Author

Gus Wiseman, Dec 06 2021

Keywords

Comments

Also the number of weakly alternating 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.

Examples

			The a(1) = 1 through a(7) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (32)     (33)      (43)
             (111)  (31)    (41)     (42)      (52)
                    (211)   (221)    (51)      (61)
                    (1111)  (311)    (222)     (322)
                            (2111)   (411)     (331)
                            (11111)  (2211)    (511)
                                     (3111)    (2221)
                                     (21111)   (4111)
                                     (111111)  (22111)
                                               (31111)
                                               (211111)
                                               (1111111)
		

Crossrefs

Alternating: A025047, ranked by A345167, also A025048 and A025049.
The strong case is A065033, ranked by A167171.
A directed version is A096441.
Non-alternating: A345192, ranked by A345168.
Weakly alternating: A349052, also A129852 and A129853.
Non-weakly alternating: A349053, ranked by A349057.
A version for ordered factorizations is A349059, strong A348610.
The complement is counted by A349061, strong A349801.
These partitions are ranked by the complement of A349794.
The non-strict case is A349795.
A000041 counts integer partitions, ordered A011782.
A001250 counts alternating permutations, complement A348615.
A344604 counts alternating compositions with twins.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], SameQ@@#||And@@EvenQ/@Take[Length/@Split[#],{2,-2}]&]],{n,0,30}]
  • PARI
    A_x(N)={my(x='x+O('x^N), g= 1 + sum(i=1, N, (x^i/(1-x^i)) * (1 + sum(j=i+1, N-i, (x^j/((1-x^j))) / prod(k=1, j-i-1, 1-x^(2*(i+k)))))));
    Vec(g)}
    A_x(52) \\ John Tyler Rascoe, Mar 20 2024

Formula

G.f.: 1 + Sum_{i>0} (x^i/(1-x^i)) * (1 + Sum_{j>i} (x^j/(1-x^j)) / Product_{k=1..j-i-1} (1-x^(2*(i+k)))). - John Tyler Rascoe, Mar 20 2024

A349061 Number of 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, 1, 2, 4, 8, 13, 21, 32, 48, 67, 99, 133, 185, 245, 333, 432, 574, 732, 957, 1208, 1554, 1941, 2468, 3060, 3844, 4731, 5893, 7204, 8898, 10816, 13268, 16043, 19546, 23523, 28497, 34150, 41147, 49106, 58892, 70020, 83597, 99047, 117778, 139087
Offset: 0

Views

Author

Gus Wiseman, Dec 06 2021

Keywords

Comments

Also the number of non-weakly alternating 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.

Examples

			The a(6) = 1 through a(10) = 13 partitions:
  (321)  (421)   (431)    (432)     (532)
         (3211)  (521)    (531)     (541)
                 (4211)   (621)     (631)
                 (32111)  (3321)    (721)
                          (4311)    (4321)
                          (5211)    (5311)
                          (42111)   (6211)
                          (321111)  (32221)
                                    (33211)
                                    (43111)
                                    (52111)
                                    (421111)
                                    (3211111)
		

Crossrefs

The strong version for compositions is A345192, ranked by A345168.
The version for compositions is A349053, ranked by A349057.
The complement is counted by A349060.
These partitions are ranked by A349794.
The non-strict case is A349796, complement A349795.
The strong case is A349801.
A000041 counts integer partitions.
A001250 counts alternating permutations, complement A348615.
A003242 counts Carlitz (anti-run) compositions.
A025047 counts alternating compositions, ranked by A345167.
A025048 and A025049 count directed alternating compositions.
A096441 counts weakly alternating 0-appended partitions.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A349052 counts weakly alternating compositions.
A349056 counts weakly alternating permutations of prime indices.
A349798 counts weakly but not strongly alternating perms of prime indices.

Programs

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

A349058 Number of weakly alternating patterns of length n.

Original entry on oeis.org

1, 1, 3, 11, 43, 203, 1123, 7235, 53171, 439595, 4037371, 40787579, 449500595, 5366500163, 68997666867, 950475759899, 13966170378907, 218043973366091, 3604426485899203, 62894287709616755, 1155219405655975763, 22279674547003283003, 450151092568978825707
Offset: 0

Views

Author

Gus Wiseman, Dec 04 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.

Examples

			The a(1) = 1 through a(3) = 11 patterns:
  (1)  (1,1)  (1,1,1)
       (1,2)  (1,1,2)
       (2,1)  (1,2,1)
              (1,2,2)
              (1,3,2)
              (2,1,1)
              (2,1,2)
              (2,1,3)
              (2,2,1)
              (2,3,1)
              (3,1,2)
		

Crossrefs

The strict case is A001250, complement A348615.
The strong case of compositions is A025047, ranked by A345167.
The unordered version is A052955.
The strong case is A345194, with twins A344605. Also the directed case.
The version for compositions is A349052, complement A349053.
The version for permutations of prime indices: A349056, complement A349797.
The version for compositions is ranked by A349057.
The version for ordered factorizations is A349059, strong A348610.
The version for partitions is A349060, complement A349061.
A003242 counts Carlitz (anti-run) compositions.
A005649 counts anti-run patterns.
A344604 counts alternating compositions with twins.
A345163 counts normal partitions with an alternating permutation.
A345170 counts partitions w/ an alternating permutation, complement A345165.
A345192 counts non-alternating compositions, ranked by A345168.
A349055 counts multisets w/ an 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([1], -vector(n,i,1) + 2*sum(k=1, n, R(n, k)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)) ) )} \\ Andrew Howroyd, Jan 13 2024

Extensions

a(9)-a(18) from Alois P. Heinz, Dec 10 2021
a(19) onwards from Andrew Howroyd, Jan 13 2024

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}]

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).

A350137 Nonsquarefree numbers whose prime signature, except possibly the first and last parts, is all even.

Original entry on oeis.org

4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, 52, 54, 56, 63, 64, 68, 72, 75, 76, 80, 81, 88, 90, 92, 96, 98, 99, 100, 104, 108, 112, 116, 117, 121, 124, 125, 126, 128, 135, 136, 144, 147, 148, 152, 153, 160, 162, 164, 169, 171, 172
Offset: 1

Views

Author

Gus Wiseman, Dec 23 2021

Keywords

Comments

A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization.
Also nonsquarefree numbers whose prime factors, taken in order and with multiplicity, are alternately constant and weakly increasing, starting with either.
Also the Heinz numbers of non-strict integer partitions whose part multiplicities, except possibly the first and last, are all even. These are counted by A349795.

Examples

			The terms together with their prime indices begin:
    4: {1,1}
    8: {1,1,1}
    9: {2,2}
   12: {1,1,2}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   24: {1,1,1,2}
   25: {3,3}
   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}
   45: {2,2,3}
   48: {1,1,1,1,2}
		

Crossrefs

This is the nonsquarefree case of the complement of A349794.
These are the Heinz numbers of the partitions counted by A349795.
A version for compositions is A349799, counted by A349800.
A complementary version is A350140, counted by A349796.
A001250 = alternating permutations, ranked by A349051, complement A348615.
A005117 = squarefree numbers, complement A013929.
A025047/A025048/A025049 = alternating compositions, ranked by A345167.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A124010 = prime signature, sorted A118914.
A345164 = alternating permutations of prime indices, complement A350251.
A349052/A129852/A129853 = weakly alternating compositions.
A349053 = non-weakly alternating compositions, ranked by A349057.
A349056 = weakly alternating permutations of prime indices.
A349058 = weakly alternating patterns, complement A350138.
A349060 = weakly alternating partitions, complement A349061.

Programs

  • Mathematica
    Select[Range[100],!SquareFreeQ[#]&&(PrimePowerQ[#]||And@@EvenQ/@Take[Last/@FactorInteger[#],{2,-2}])&]
Showing 1-10 of 11 results. Next