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 10 results.

A349053 Number of non-weakly alternating integer compositions of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 4, 12, 37, 95, 232, 533, 1198, 2613, 5619, 11915, 25011, 52064, 107694, 221558, 453850, 926309, 1884942, 3825968, 7749312, 15667596, 31628516, 63766109, 128415848, 258365323, 519392582, 1043405306, 2094829709, 4203577778, 8431313237, 16904555958
Offset: 0

Views

Author

Gus Wiseman, Dec 16 2021

Keywords

Comments

We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. Then a sequence is (strongly) alternating iff it is a weakly alternating anti-run.

Examples

			The a(6) = 12 compositions:
  (1,1,2,2,1)  (1,1,2,3)  (1,2,4)
  (1,2,1,1,2)  (1,2,3,1)  (4,2,1)
  (1,2,2,1,1)  (1,3,2,1)
  (2,1,1,2,1)  (2,1,1,3)
               (3,1,1,2)
               (3,2,1,1)
		

Crossrefs

Complementary directed versions are A129852/A129853, strong A025048/A025049.
The strong version is A345192.
The complement is counted by A349052.
These compositions are ranked by A349057, strong A345168.
The complementary version for patterns is A349058, strong A345194.
The complementary multiplicative version is A349059, strong A348610.
An unordered version (partitions) is A349061, complement A349060.
The version for ordered prime factorizations is A349797, complement A349056.
The version for patterns is A350138, strong A350252.
The version for ordered factorizations is A350139.
A001250 counts alternating permutations, complement A348615.
A001700 counts compositions of 2n with alternating sum 0.
A003242 counts Carlitz (anti-run) compositions.
A011782 counts compositions, unordered A000041.
A025047 counts alternating compositions, ranked by A345167.
A106356 counts compositions by number of maximal anti-runs.
A344604 counts alternating compositions with twins.
A345164 counts alternating ordered prime factorizations.
A349054 counts strict alternating compositions.

Programs

  • Mathematica
    wwkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}]||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/@IntegerPartitions[n],!wwkQ[#]&]],{n,0,10}]

Formula

a(n) = A011782(n) - A349052(n).

Extensions

a(21)-a(35) from Martin Ehrenstein, Jan 08 2022

A345194 Number of alternating patterns of length n.

Original entry on oeis.org

1, 1, 2, 6, 22, 102, 562, 3618, 26586, 219798, 2018686, 20393790, 224750298, 2683250082, 34498833434, 475237879950, 6983085189454, 109021986683046, 1802213242949602, 31447143854808378, 577609702827987882, 11139837273501641502, 225075546284489412854
Offset: 0

Views

Author

Gus Wiseman, Jun 17 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.
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).
The version with twins (A344605) is identical to this sequence except with a(2) = 3 instead of 2.
From Gus Wiseman, Jan 16 2022: (Start)
Conjecture: Also the number of weakly up/down patterns of length n, where a sequence is weakly up/down if it is alternately weakly increasing and weakly decreasing, starting with an increase. For example, the a(0) = 1 through a(3) = 6 weakly up/down patterns are:
() (1) (1,1) (1,1,1)
(2,1) (1,1,2)
(2,1,1)
(2,1,2)
(2,1,3)
(3,1,2)
(End)

Examples

			The a(0) = 1 through a(3) = 6 alternating patterns:
  ()  (1)  (1,2)  (1,2,1)
           (2,1)  (1,3,2)
                  (2,1,2)
                  (2,1,3)
                  (2,3,1)
                  (3,1,2)
		

Crossrefs

The version for permutations is A001250, complement A348615.
The version for compositions is A025047, complement A345192.
The version with twins (x,x) is A344605.
The version for perms of prime indices is A345164, complement A350251.
The version for factorizations is A348610, complement A348613, weak A349059.
The weak version is A349058, complement A350138, compositions A349052.
The complement is counted by A350252.
A000670 = patterns, ranked by A333217.
A003242 = anti-run compositions.
A005649 = anti-run patterns, complement A069321.
A019536 = necklace patterns.
A129852 and A129853 = up/down and down/up compositions.
A226316 = patterns avoiding (1,2,3), weakly A052709, complement A335515.
A345170 = partitions w/ alternating permutation, complement A345165.
A349055 = normal multisets w/ alternating permutation, complement A349050.

Programs

  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    allnorm[n_]:=If[n<=0,{{}},Function[s, Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],wigQ]],{n,0,6}]
  • PARI
    F(p,x) = {sum(k=0, p, (-1)^((k+1)\2)*binomial((p+k)\2, k)*x^k)}
    R(n,k) = {Vec(if(k==1, x, 2*F(k-2,-x)/F(k-1,x)-2-(k-2)*x) + O(x*x^n))}
    seq(n)= {concat([1], sum(k=1, n, R(n, k)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)) ))} \\ Andrew Howroyd, Feb 04 2022

Formula

a(n) = 2*A350354(n) for n >= 2. - Andrew Howroyd, Feb 04 2022

Extensions

a(10)-a(18) from Alois P. Heinz, Dec 10 2021
Terms a(19) and beyond from Andrew Howroyd, Feb 04 2022

A069321 Stirling transform of A001563: a(0) = 1 and a(n) = Sum_{k=1..n} Stirling2(n,k)*k*k! for n >= 1.

Original entry on oeis.org

1, 1, 5, 31, 233, 2071, 21305, 249271, 3270713, 47580151, 760192505, 13234467511, 249383390393, 5057242311031, 109820924003705, 2542685745501751, 62527556173577273, 1627581948113854711, 44708026328035782905, 1292443104462527895991, 39223568601129844839353
Offset: 0

Views

Author

Karol A. Penson, Mar 14 2002

Keywords

Comments

The number of compatible bipartitions of a set of cardinality n for which at least one subset is not underlined. E.g., for n=2 there are 5 such bipartitions: {1 2}, {1}{2}, {2}{1}, {1}{2}, {2}{1}. A005649 is the number of bipartitions of a set of cardinality n. A000670 is the number of bipartitions of a set of cardinality n with none of the subsets underlined. - Kyle Petersen, Mar 31 2005
a(n) is the cardinality of the image set summed over "all surjections". All surjections means: onto functions f:{1, 2, ..., n} -> {1, 2, ..., k} for every k, 1 <= k <= n. a(n) = Sum_{k=1..n} A019538(n, k)*k. - Geoffrey Critzer, Nov 12 2012
From Gus Wiseman, Jan 15 2022: (Start)
For n > 1, also the number of finite sequences of length n + 1 covering an initial interval of positive integers with at least two adjacent equal parts, or non-anti-run patterns, ranked by the intersection of A348612 and A333217. The complement is counted by A005649. For example, the a(3) = 31 patterns, grouped by sum, are:
(1111) (1222) (1122) (1112) (1233) (1223)
(2122) (1221) (1121) (1332) (1322)
(2212) (2112) (1211) (2133) (2213)
(2221) (2211) (2111) (2331) (2231)
(1123) (3312) (3122)
(1132) (3321) (3221)
(2113)
(2311)
(3112)
(3211)
Also the number of ordered set partitions of {1,...,n + 1} with two successive vertices together in some block.
(End)

Crossrefs

The complement is counted by A005649.
A version for permutations of prime indices is A336107.
A version for factorizations is A348616.
Dominated (n > 1) by A350252, complement A345194, compositions A345192.
A000670 = patterns, ranked by A333217.
A001250 = alternating permutations, complement A348615.
A003242 = anti-run compositions, ranked by A333489.
A019536 = necklace patterns.
A226316 = patterns avoiding (1,2,3), weakly A052709, complement A335515.
A261983 = not-anti-run compositions, ranked by A348612.
A333381 = anti-runs of standard compositions.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j)*binomial(n, j), j=1..n))
        end:
    a:= n-> `if`(n=0, 2, b(n+1)-b(n))/2:
    seq(a(n), n=0..30);  # Alois P. Heinz, Feb 02 2018
  • Mathematica
    max = 20; t = Sum[n^(n - 1)x^n/n!, {n, 1, max}]; Range[0, max]!CoefficientList[Series[D[1/(1 - y(Exp[x] - 1)), y] /. y -> 1, {x, 0, max}], x] (* Geoffrey Critzer, Nov 12 2012 *)
    Prepend[Table[Sum[StirlingS2[n, k]*k*k!, {k, n}], {n, 18}], 1] (* Michael De Vlieger, Jan 03 2016 *)
    a[n_] := (PolyLog[-n-1, 1/2] - PolyLog[-n, 1/2])/4; a[0] = 1; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Mar 30 2016 *)
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],MemberQ[Differences[#],0]&]],{n,0,8}] (* Gus Wiseman, Jan 15 2022 *)
  • PARI
    {a(n)=polcoeff(1+sum(m=1, n, (2*m-1)!/(m-1)!*x^m/prod(k=1, m, 1+(m+k-1)*x+x*O(x^n))), n)} \\ Paul D. Hanna, Oct 28 2013

Formula

Representation as an infinite series: a(0) = 1 and a(n) = Sum_{k>=2} (k^n*(k-1)/(2^k))/4 for n >= 1. This is a Dobinski-type summation formula.
E.g.f.: (exp(x) - 1)/((2 - exp(x))^2).
a(n) = (1/2)*(A000670(n+1) - A000670(n)).
O.g.f.: 1 + Sum_{n >= 1} (2*n-1)!/(n-1)! * x^n / (Product_{k=1..n} (1 + (n + k - 1)*x)). - Paul D. Hanna, Oct 28 2013
a(n) = (A000629(n+1) - A000629(n))/4. - Benoit Cloitre, Oct 20 2002
a(n) = A232472(n-1)/2. - Vincenzo Librandi, Jan 03 2016
a(n) ~ n! * n / (4 * (log(2))^(n+2)). - Vaclav Kotesovec, Jul 01 2018
a(n > 0) = A000607(n + 1) - A005649(n). - Gus Wiseman, Jan 15 2022

A349800 Number of integer compositions of n that are weakly alternating and have at least two adjacent equal parts.

Original entry on oeis.org

0, 0, 1, 1, 4, 9, 16, 33, 62, 113, 205, 373, 664, 1190, 2113, 3744, 6618, 11683, 20564, 36164, 63489, 111343, 195042, 341357, 596892, 1042976, 1821179, 3178145, 5543173, 9663545, 16839321, 29332231, 51075576, 88908912, 154722756, 269186074, 468221264
Offset: 0

Views

Author

Gus Wiseman, Dec 16 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 compositions that are weakly but not strongly alternating; also weakly alternating non-anti-run compositions.

Examples

			The a(2) = 1 through a(6) = 16 compositions:
  (1,1)  (1,1,1)  (2,2)      (1,1,3)      (3,3)
                  (1,1,2)    (1,2,2)      (1,1,4)
                  (2,1,1)    (2,2,1)      (2,2,2)
                  (1,1,1,1)  (3,1,1)      (4,1,1)
                             (1,1,1,2)    (1,1,1,3)
                             (1,1,2,1)    (1,1,2,2)
                             (1,2,1,1)    (1,1,3,1)
                             (2,1,1,1)    (1,3,1,1)
                             (1,1,1,1,1)  (2,2,1,1)
                                          (3,1,1,1)
                                          (1,1,1,1,2)
                                          (1,1,1,2,1)
                                          (1,1,2,1,1)
                                          (1,2,1,1,1)
                                          (2,1,1,1,1)
                                          (1,1,1,1,1,1)
		

Crossrefs

This is the weakly alternating case of A345192, ranked by A345168.
The case of partitions is A349795, ranked by A350137.
The version counting permutations of prime indices is A349798.
These compositions are ranked by A349799.
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.
A345165 = partitions without an alternating permutation, ranked by A345171.
A345170 = partitions with an alternating permutation, ranked by A345172.
A345173 = non-alternating anti-run partitions, ranked by A345166.
A345195 = non-alternating anti-run compositions, ranked by A345169.
A348377 = non-alternating non-twin compositions.
A349801 = non-alternating partitions, ranked by A289553.
Weakly alternating:
- A349052 = compositions, directed A129852/A129853, complement A349053.
- A349056 = permutations of prime indices, complement A349797.
- A349057 = complement of standard composition numbers (too dense).
- A349058 = patterns, complement A350138.
- A349059 = ordered factorizations, complement A350139.
- A349060 = partitions, complement A349061.

Programs

  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y] &&Length[Split[Sign[Differences[y]]]]==Length[y]-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/@IntegerPartitions[n],(whkQ[#]||whkQ[-#])&&!wigQ[#]&]],{n,0,10}]

Formula

a(n) = A349052(n) - A025047(n). - Andrew Howroyd, Jan 31 2024

Extensions

a(21) onwards from Andrew Howroyd, Jan 31 2024

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

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

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, 2, 0, 1, 0, 0, 0, 4, 0, 0, 0, 4, 0, 2, 0, 2, 2, 0, 0, 5, 1, 2, 0, 2, 0, 4, 0, 4, 0, 0, 0, 8, 0, 0, 2, 1, 0, 2, 0, 2, 0, 2, 0, 9, 0, 0, 2, 2, 0, 2, 0, 5, 1, 0, 0, 8, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jan 08 2022

Keywords

Comments

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

Examples

			The a(n) permutations for selected n:
n = 4    12    24     48      60     72      90     96       120
   ----------------------------------------------------------------
    22   223   2223   22223   2235   22233   2335   222223   22235
         322   2232   22232   2253   22323   2353   222232   22253
               2322   22322   2352   22332   2533   222322   22325
               3222   23222   2532   23223   3235   223222   22352
                      32222   3225   23322   3325   232222   22523
                              3522   32223   3352   322222   22532
                              5223   32232   3532            23225
                              5322   32322   5233            23522
                                     33222   5323            25223
                                             5332            25322
                                                             32225
                                                             32252
                                                             32522
                                                             35222
                                                             52223
                                                             52232
                                                             52322
                                                             53222
		

Crossrefs

The non-anti-run case is A336107, complement A335452.
The complement is counted by A345164, with twins A344606.
Positions of nonzero terms are A345171, counted by A345165.
Positions of zeros are A345172, counted by A345170.
Compositions of this type are counted by A345192, ranked by A345168.
Ordered factorizations of this type counted by A348613, complement A348610.
Compositions weakly of this type are counted by A349053, ranked by A349057.
The weak version is A349797, complement A349056.
The case that is also weakly alternating is A349798, compositions A349800.
Patterns of this type are counted by A350252, complement A345194.
A001250 counts alternating permutations, complement A348615.
A003242 counts Carlitz (anti-run) compositions.
A008480 counts permutations of prime factors (ordered prime factorizations).
A025047/A025048/A025049 count alternating compositions, ranked by A345167.
A056239 adds up prime indices, row sums of A112798 (row lengths A001222).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344616 gives the alternating sum of prime indices, reverse A316524.
A349052/A129852/A129853 count weakly alternating compositions.

Programs

  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]] ==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[Permutations[Flatten[ ConstantArray@@@FactorInteger[n]]],!wigQ[#]&]],{n,100}]

Formula

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

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

A350140 Nonsquarefree numbers whose prime signature has at least one odd part other the first or last.

Original entry on oeis.org

60, 84, 120, 132, 140, 150, 156, 168, 204, 220, 228, 240, 260, 264, 270, 276, 280, 294, 300, 308, 312, 315, 336, 340, 348, 364, 372, 378, 380, 408, 420, 440, 444, 456, 460, 476, 480, 490, 492, 495, 516, 520, 528, 532, 540, 552, 560, 564, 572, 580, 585, 588
Offset: 1

Views

Author

Gus Wiseman, Dec 25 2021

Keywords

Comments

A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization.
Also Heinz numbers of non-weakly alternating non-strict integer partitions, where we define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. These partitions are counted by A349796. This sequence involves the somewhat degenerate case where no strict increases are allowed.

Examples

			The terms together with their Heinz partitions begin (A-E = 10-14):
     60: (3211)      276: (9211)      420: (43211)
     84: (4211)      280: (43111)     440: (53111)
    120: (32111)     294: (4421)      444: (C211)
    132: (5211)      300: (33211)     456: (82111)
    140: (4311)      308: (5411)      460: (9311)
    150: (3321)      312: (62111)     476: (7411)
    156: (6211)      315: (4322)      480: (3211111)
    168: (42111)     336: (421111)    490: (4431)
    204: (7211)      340: (7311)      492: (D211)
    220: (5311)      348: (A211)      495: (5322)
    228: (8211)      364: (6411)      516: (E211)
    240: (321111)    372: (B211)      520: (63111)
    260: (6311)      378: (42221)     528: (521111)
    264: (52111)     380: (8311)      532: (8411)
    270: (32221)     408: (72111)     540: (322211)
		

Crossrefs

Including all nonsquarefree numbers gives A013929, complement A005117.
Subsets include A088860 and A110286.
Signatures of this type are counted by A274230, complement A027383.
The strict instead of non-strict version is A336568, counted by A347548.
A version for compositions allowing strict is A349057, counted by A349053.
Allowing strict partitions gives A349794, counted by A349061.
These partitions are counted by A349796.
The complement in nonsquarefree partitions is A350137, counted by A349795.
A000041 = integer partitions, strict A000009.
A001250 = alternating permutations, ranked by A349051, complement A348615.
A003242 = Carlitz (anti-run) compositions.
A025047/A025048/A025049 = alternating compositions, ranked by A345167.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A096441 = weakly alternating 0-appended partitions.
A124010 = prime signature, sorted A118914.
A345164 = alternating permutations of prime indices, complement A350251.
A345170 = partitions w/ an alternating permutation, ranked by A345172.
A349052/A129852/A129853 = weakly alternating compositions.
A349056 = weakly alternating permutations of prime indices.
A349058 = weakly alternating patterns, complement A350138.
A349060 = weakly alternating partitions, strong A349801.
A349798 = weakly but not strongly alternating perms of prime indices.

Programs

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

Formula

Complement of A005117 in A349794.

A350353 Numbers whose multiset of prime factors has a permutation that is not weakly alternating.

Original entry on oeis.org

30, 36, 42, 60, 66, 70, 72, 78, 84, 90, 100, 102, 105, 108, 110, 114, 120, 126, 130, 132, 138, 140, 144, 150, 154, 156, 165, 168, 170, 174, 180, 182, 186, 190, 195, 196, 198, 200, 204, 210, 216, 220, 222, 225, 228, 230, 231, 234, 238, 240, 246, 252, 255, 258
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2022

Keywords

Comments

We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either.

Examples

			The terms together with a (generally not unique) non-weakly alternating permutation of each multiset of prime indices begin:
   30 : (1,2,3)       100 : (1,3,3,1)
   36 : (1,2,2,1)     102 : (1,2,7)
   42 : (1,2,4)       105 : (2,3,4)
   60 : (1,1,2,3)     108 : (1,2,2,1,2)
   66 : (1,2,5)       110 : (1,3,5)
   70 : (1,3,4)       114 : (1,2,8)
   72 : (1,1,2,2,1)   120 : (1,1,1,2,3)
   78 : (1,2,6)       126 : (1,2,4,2)
   84 : (1,1,2,4)     130 : (1,3,6)
   90 : (1,2,3,2)     132 : (1,1,2,5)
		

Crossrefs

The strong version is A289553, complement A167171.
These are the positions of nonzero terms in A349797.
Below, WA = "weakly alternating":
- WA compositions are counted by A349052/A129852/A129853.
- Non-WA compositions are counted by A349053, ranked by A349057.
- WA permutations of prime factors = A349056, complement A349797.
- WA patterns are counted by A349058, complement A350138.
- WA ordered factorizations are counted by A349059, complement A350139.
- WA partitions are counted by A349060, complement A349061.
A001250 counts alternating permutations, complement A348615.
A008480 counts permutations of prime factors.
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.
A345164 = alternating permutations of prime factors, complement A350251.

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}];
    Select[Range[100],Select[Permutations[primeMS[#]],!whkQ[#]&&!whkQ[-#]&]!={}&]
Showing 1-10 of 10 results.