Sum[(-1)^n x^((3n^2-n)/2), {n,-5, 5}]

DistinctPartitions[n_] := 
  Select[IntegerPartitions[n], Length[#] == Length[Union[#]] &];

EvenOdd[n_] := 
 With[{dp = DistinctPartitions[n]}, 
  Grid[{Column[Select[dp, #]] & /@ {EvenQ@*Length, OddQ@*Length}}, 
   Alignment -> Top]]; 

EvenOdd[14]

EvenOdd[15]

YoungDiagram[xs_] := Grid[Table[Graphics[Disk[], ImageSize -> 10], #] & /@ ReverseSort[xs]];

Grid[Table[{StringRiffle[ToString /@ p, "+"], YoungDiagram[p]}, {p, DistinctPartitions[9]}], Dividers -> {True, All}, Alignment -> Left]

Grid[{YoungDiagram /@ {{4, 3, 2}, {5, 4}}}, Alignment -> Top, ColumnSpacings -> 5]

DiagonalLength[xs_] := With[{fp = FirstPosition[First[xs] + 1 - Range@Length[xs] - xs, x_ /; x > 0]}, 
    If[MissingQ[fp], Length[xs], fp[[1]] - 1]
  ];
PartitionPair[xs_] := 
  Sort[{xs, 
    If[DiagonalLength[xs] < Last[xs], 
     Append[xs - PadRight[Table[1, DiagonalLength[xs]], Length[xs]], DiagonalLength[xs]], 
     Most[xs] + PadRight[Table[1, Last[xs]], Length[xs] - 1]
    ]
  }];
Pairing[n_] := Grid[Map[YoungDiagram, Values[GroupBy[DistinctPartitions[n], PartitionPair]], {2}], Alignment -> Left, Dividers -> {All, All}]

Pairing[9]

Pairing[7]

Grid[Transpose[
  Table[{YoungDiagram[Range[2 n - 1, n, -1]], 
    Style[Total@Range[2 n - 1, n, -1], 24]}, {n, 1, 4}]], 
 Alignment -> Top, Dividers -> {All, True}]

Grid[Transpose[
  Table[{YoungDiagram[Range[2 n - 2, n, -1]], 
    Style[Total@Range[2 n - 2, n, -1], 24]}, {n, 2, 4}]], 
 Alignment -> Top, Dividers -> {All, True}]

ResourceFunction["MaTeXInstall"][];
<< MaTeX`
SetOptions[MaTeX, "Preamble" -> {"\\usepackage{amsfonts}"}];
texStyle = 
  Sequence @@ {BaseStyle -> {FontFamily -> "CMU Serif", 
      FontSize -> 16}, TicksStyle -> Directive[30], 
    FrameTicksStyle -> Directive[30], LabelStyle -> Black, 
    AxesStyle -> Black, FrameStyle -> Black, PlotStyle -> Black};

Plot[-Cos[ka], {ka, -Pi, Pi}, Axes -> False, Frame -> True, 
 FrameTicks -> {{None, 
    None}, {{{-Pi/2, MaTeX["-\\frac{\\pi}{2a}"]}, {Pi/2, 
      MaTeX["\\frac{\\pi}{2a}"]}}, None}}, 
 FrameLabel -> {MaTeX["k", Magnification -> 2], 
   MaTeX["\\epsilon(k)", Magnification -> 2]}, 
 Prolog -> {LightGray, Opacity[0.5], 
   Rectangle[Scaled[{0, 0}], Scaled[{1, 0.5}]]}, 
 GridLines -> {{-Pi/2, Pi/2}, None}, 
 GridLinesStyle -> Directive[Dashed], Evaluate@texStyle]

GraphicsRow[{Show[
   SliceContourPlot3D[z, 
    z == -Cos[kxa] - Cos[kya], {kxa, -Pi, Pi}, {kya, -Pi, Pi}, {z, -2,
      2}, BoxRatios -> Automatic, 
    ContourShading -> Join[Table[Gray, 8], Table[White, 7]], 
    Contours -> Subdivide[-2, 2, 14], LabelStyle -> Black, 
    BoxStyle -> Black, Ticks -> None], 
   AxesLabel -> {MaTeX["k_x", Magnification -> 2], 
     MaTeX["k_y", Magnification -> 2], 
     MaTeX["\\epsilon(k)", Magnification -> 2]}], 
  ContourPlot[-Cos[kxa] - Cos[kya], {kxa, -Pi, Pi}, {kya, -Pi, Pi}, 
   Axes -> False, Frame -> True, FrameTicks -> None, 
   FrameLabel -> {MaTeX["k_x", Magnification -> 2], 
     MaTeX["k_y", Magnification -> 2]}, 
   ContourShading -> Join[Table[LightGray, 8], Table[White, 7]], 
   Contours -> Subdivide[-2, 2, 14], Evaluate@texStyle]}]

sl3 = Join[
   Table[SparseArray[{ij -> 1}, {3, 3}], {ij, 
     Flatten[Permutations /@ Subsets[Range[3], {2}], 1]}], 
   DiagonalMatrix /@ {{1, -1, 0}, {0, 1, -1}}];
MatrixForm /@ sl3

cartan = sl3[[-2 ;;]];
coeffs[mat_, mats_] := 
  LinearSolve[Transpose[Flatten /@ mats], Flatten[mat]];
adjoints = Table[coeffs[h . g - g . h, sl3], {h, cartan}, {g, sl3}];
MatrixForm /@ adjoints

ListPlot[Transpose[
  Diagonal /@ adjoints], 
 Axes -> False, Frame -> True, PlotStyle -> {Black, PointSize[.02]}, 
 ImageSize -> 500, Evaluate@texStyle]

roots = Transpose[Diagonal /@ (( {
       {0, -1/2},
       {Sqrt[3]/3, Sqrt[3]/6}
      } ) . adjoints)];
hexagon = ListPlot[roots, 
 Ticks -> {Thread[{#, MaTeX[#, Magnification -> 2]} &@{-1, -1/2, 1/2, 
      1}], Thread[{#, MaTeX[#, Magnification -> 2]} &@{-Sqrt[3]/2, 
      Sqrt[3]/2}]}, PlotStyle -> {Black, PointSize[.02]}, 
 AspectRatio -> 1, ImageSize -> 500, 
 Prolog -> {FaceForm[], EdgeForm[{Thick, Blue}], RegularPolygon[6]}, 
 Evaluate@texStyle]

weights = Transpose[Diagonal /@ (( {
       {0, -1/2},
       {Sqrt[3]/3, Sqrt[3]/6}
      } ) . cartan)];
MatrixForm /@ weights
Show[hexagon, 
 ListPlot[weights, PlotStyle -> {Red, PointSize[.02]}, 
  PlotLegends -> 
   PointLegend[{Black, Red}, 
    Evaluate[
     Style[#, 20, FontFamily -> "CMU Serif"] & /@ {"Roots", 
       "Weights"}], LegendFunction -> "Frame"]], 
 Epilog -> {EdgeForm[{Thick, Red}], FaceForm[], Polygon[weights]}]

lattice = Normal[Plot[
  Table[Tan[θ] x - 0.5 shift Sec[θ], {θ, 0, 
    2 Pi/3, Pi/3}, {shift, -7, 7}], {x, -4, 4}, Axes -> False, 
  AspectRatio -> Full, PlotStyle -> Green], Pi/6] /. 
prim : _Line | _Point | _Polygon :> 
  GeometricTransformation[prim, RotationTransform[Pi/6]];

Show[hexagon, lattice, 
 PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}}, Ticks -> None]

a1 = {1, 0};
a2 = {-1/2, Sqrt[3]/2};

Show[lattice, 
 ListPlot[Flatten@
   Table[Labeled[-m a1 - n a2, 
     Style[Min[m, n] + 1, 16, FontFamily -> "CMU Serif"], Above], {m, 
     0, 5}, {n, 0, 5}]], PlotRange -> {{-3.7, 4}, {-3.6, 1}}, 
 AspectRatio -> Automatic, Background -> Transparent]

isPositive[{x_, y_}] := 0 <= ArcTan[y, x] <= 2 Pi/3;

simpleRoots = Transpose[{a1, a2}];
fundWeights = {{0, 1/2}, {1/Sqrt[3], Sqrt[3]/6}};

fromRoots[{x_, y_}] := simpleRoots . {x, y};
toRoots[{x_, y_}] := Inverse[simpleRoots] . {x, y};
fromWeights[{x_, y_}] := fundWeights . {x, y};
toWeights[{x_, y_}] := Inverse[fundWeights] . {x, y};

weyl = Join[Table[RotationMatrix[2 n Pi/3], {n, 3}], 
   Table[ReflectionMatrix[{Cos[n Pi/3], Sin[n Pi/3]}], {n, 1, 5, 2}]];
eweyl = {1, 1, 1, -1, -1, -1};

ρ = fromRoots[{1, 1}];

numerator[m_, n_] := 
  Thread[{Table[w . (ρ + fromWeights[{m, n}]), {w, weyl}], 
    eweyl}];
hull[m_, n_] := ConvexHullRegion[First /@ numerator[m, n]];

pts[m_, n_] := 
  With[{mem = RegionMember[hull[m, n]]}, 
   fromWeights /@ 
    Select[Tuples@*
       List @@ (Range @@@ 
        Simplify@
         RegionBounds[
          ConvexHullRegion[toWeights /@ (First /@ numerator[m, n])]]),
      mem[fromWeights[#]] &]
   ];

ct[{x_, y_}] := With[{rt = Simplify@toRoots[{x, y}]},
   If[! AllTrue[rt, # >= 0 && IntegerQ[#] &], 0, Min @@ rt + 1]
   ];

char[m_, n_] := 
  Select[Thread[{pts[m, n], 
     Table[Sum[hex[[2]] ct[hex[[1]] - p], {hex, numerator[m, n]}], {p,
        pts[m, n]}]}], #[[2]] != 0 &];

charPlot[m_, n_] := 
 ListPlot[Labeled[#1, Style[#2, 20, FontFamily -> "CMU Serif"], 
     Above] & @@@ char[m, n], Axes -> False, AspectRatio -> Automatic,
   Background -> Transparent, texStyle]

charPlot[1,0]

GraphicsRow[
 Table[Show[charPlot[n, 0], 
   PlotLabel -> 
    MaTeX[ToString[n] <> "\\omega_1", Magnification -> 2]], {n, 3}], 
 ImageSize -> 800]

charPlot[1, 1]

charPlot[3, 2]