Twisted Elliptic Genera

We study the twisted elliptic genera of 2d $(0,4)$ SCFTs associated with the BPS strings in the twisted circle compactification of 6d rank-one $(1,0)$ SCFTs. Such objects can arise when the 6d gauge algebra allows outer automorphism, thus are classified by twisted affine Lie algebras. We study several fascinating aspects of the twisted elliptic genera including 2d localization, twisted elliptic blowup equations, Higgsing and spectral flow symmetry. We derive a recursion formula with respect to the number of strings to exactly compute the twisted elliptic genera. We also investigate the modular bootstrap of twisted one-string elliptic genera and find the modularity of congruence subgroups $\Gamma_1(N)$ naturally appears with possible $N=2,3,4$. Geometrically, our study solves the refined BPS partition of the underlying genus-one fibered Calabi-Yau threefolds with $N$-section.


Introduction
The classification of superconformal field theories (SCFTs) and supersymmetric gauge theories in various dimensions has been a major subject in the study of supersymmetry in the recent decades. Given Nahm's classification on superconformal algebras [1], the highest dimension in which a nontrivial SCFT can exist is six. It is now well-known that the 6d (2, 0) SCFTs admit an ADE classification [2,3], while the 6d (1, 0) SCFTs admit an "atomic classification" with certain generalized quiver structures [4]. See an excellent review [5]. More recently, much progress has been made in the understanding of the compactification of 6d SCFTs to lower dimensions. In particular, the compactification to 5d Kaluza-Klein (KK) theories is mostly understood and results in a conjectural classification on 5d SCFTs by decoupling 5d hypermultiplets from the KK theories [6][7][8][9][10].
Besides the straightforward circle compactification, it was observed in [10] that when a 6d SCFT has a discrete global symmetry, one can do twisted circle compactification to a new 5d KK theory. This process brings in a large class of highly nontrivial 5d KK theories, many of which have fascinating 5d Lagrangian descriptions [11]. There exist two possibilities for the 6d discrete global symmetry: the first kind comes when the gauge algebra allows outer automorphism, in which case the twisted circle compactification means to fold the 6d vector multiplets; the second kind comes when the quiver structure has a discrete symmetry, in which case one folds the 6d tensor multiplets. In the current work, we are interested in the first kind of twisted circle compactification of 6d (1, 0) SCFTs as it is classified by twisted affine Lie algebras and related to the modularity of congruence subgroups Γ 1 (N ). The second kind of twisted circle compactification for 6d (2, 0) SCFTs has been studied in [12].
The 6d (1, 0) SCFTs can be geometrically engineered by F-theory compactified on noncompact elliptic Calabi-Yau threefolds. More precisely, such Calabi-Yau geometry M is an elliptic fibration over a non-compact base surface B in which all curves are simultaneously shrinkable to zero volume. The dim H 1,1 (B, Z) gives the dimension of the tensor branch, i.e., the rank of the 6d (1, 0) SCFT. We are particularly interested in the rank one case, where the non-compact base B is just O P 1 (−n) for n = 1, 2, 3, . . . , 8,12. The geometric engineering suggests that when a 6d (1, 0) SCFT is put on the 6d Nekrasov Omega background C 2 1 , 2 × T 2 , the partition function should be equal to the refined topological string partition function on Calabi-Yau M . On the other hand, 6d (1, 0) SCFTs contain the BPS strings or the so-called self-dual strings with worldsheet theory as 2d (0, 4) SCFTs. From the viewpoint of worldsheet, the elliptic genera of the 2d theories should also be equal to the 6d partition function upon suitable expansion by the number of strings. Along with the circle compactification to 5d KK theory, these yield the well established relation chain non-compact elliptic CY3 . (1.1) In the case of twisted circle compactification, the non-compact elliptic Calabi-Yau threefolds are generalized to non-compact genus-one fibered Calabi-Yau threefolds, with additional rational sections or just N -sections. The genus-one fibered Calabi-Yau geometries and their role in F-theory compactification have drawn lots of attention in recent years [13][14][15][16][17][18][19][20][21][22]. In our situation, the number of sections is naturally reflected by the type of twists: 2r−1 , D (2) r , E (2) 6 , 3, D 2r . (1. 2) The geometric engineering of these special genus-one fibered Calabi-Yau threefolds produces the twisted compactification of 6d (1, 0) SCFTs. The BPS strings of the 6d SCFTs on the torus T 2 = S 1 × S 1 also get twisted along one S 1 in the sixth direction such that the elliptic genera now have fractional q 1/N orders. Although both the 6d SCFTs and the 2d worldsheet theories are in twisted circle compactification, one can still look from 6d and 2d to keep the modularity manifest. Notably, the modularity is no longer the SL(2, Z) of ordinary elliptic genera, but the congruence subgroups Γ 1 (N ) of SL (2, Z). In summary, we expect the following twisted version of the relation chain (1.1) as We are interested in the twisted elliptic genera arising here. It should be noted that this term actually has already been used in a different context for 2d N = (2, 2) SCFTs such as the twisted elliptic genus of K3 surface, see e.g. [23,24]. The twist in our term comes from the same twist as in twisted affine Lie algebras and is specifically for 2d N = (0, 4) SCFTs, thus should not be confused. For the second kind of twist, one can also study the associated twisted elliptic genera, which for the 6d (2, 0) cases have been studied in [12]. However, those are not related to twisted affine Lie algebras, thus are not the concern of the current paper.
Some typical examples of twisted circle compactification include the Z 2 twist of 6d (1, 0) pure su(3) SCFT which compactifies to the 5d su(3) gauge theory with Chern-Simons level 9, and the Z 3 twist of 6d (1, 0) pure so (8) SCFT which compactifies to 5d su(4) gauge theory with Chern-Simons level 8. The 5d KK theories are not necessarily gauge theories. For example, the Z 2 twist of 6d (1, 0) pure so (8) SCFT is known to be a 5d non-Lagrangian theory. We will study the twisted elliptic genera for all these examples in this paper.
In the following, we summarize several approaches to the twisted elliptic genera.
• Localization of 2d (0, 4) SCFTs. Elliptic genera of some special 2d theories can be exactly computed by 2d localization, i.e., Jeffrey-Kirwan residue, analogous to the ADHM construction in 0d [25,26]. This approach can be generalized to some special Z 2 twisted theories [27]. In general, this method when applicable is the most efficient way to compute (twisted) elliptic genera to arbitrary number of strings. Two known examples are the n = 3, su(3) (2) theory and the n = 4, so(2r + 8) (2) theories which we will review in Section 2.4.
• Γ 1 (N ) modular ansatz. The modular ansatz method exploits the modularity of elliptic genera [28][29][30][31][32], inspired by the early work on compact elliptic Calabi-Yau threefolds [33]. In particular, the SL(2, Z) modular ansatz for the one-string elliptic genera of rank-one 6d (1, 0) SCFTs has been extensively studied in [31]. On the other hand, the modular ansatz of congruence subgroups Γ 0 (N ) and Γ 1 (N ) has been investigated in [16,20,21] for topological strings on genus-one fibered Calabi-Yau threefolds with N -section. Recently, the genus-one fibered Calabi-Yau threefolds associated with twisted affine Lie algebras were discussed in [34]. We combine these results together to propose a suitable Γ 1 (N ) modular ansatz for the one-string twisted elliptic genera and successfully fix the ansatz for almost all rank-one twisted theories. Interestingly, we find that for almost all rank-one twisted theories, the modular group is enhanced from Γ 1 (N ) to Γ 0 (N ).
• Brane webs and topological vertex. Many 6d (1, 0) SCFTs allow brane-web interpretations. When the brane-web construction exists, one can use the (refined) topological vertex to compute the 6d partition function. This method can be cleverly extended to some Z 2 twisted theories by including O5-planes [27,35,36]. For example, the 5d su(3) 9 partition function can be computed by an extension of topological vertex called O-vertex [35,37].
• Twisting from Higgsing. It has been noticed that some 6d twisted theories can be obtained by the Higgsing from 6d untwisted theories [38,39]. This generalizes the known Higgsing trees for 6d (1, 0) SCFTs, see e.g. [31]. Most known examples of twisting from Higgsing come from so(2r) (2) type of theories with n = 2, 3, 4 [38,39]. We will systematically study the twisting from Higgsing phenomenon for all rankone theories, including the Higgsing from both untwisted theories and twisted ones. We will also propose a simple algebraic method to determine the precise Higgsing conditions based on representation decompositions.
• Twisted elliptic blowup equations and the recursion formula. This will be the main computational method in the current paper. In a series of works [40][41][42][43], the elliptic blowup equations have been established for the elliptic genera of all 6d (1, 0) SCFTs, which generalized Nakajima-Yoshioka's blowup equations in 4d and 5d [44][45][46][47][48][49]. Now we further generalize these very efficient and universal functional equations to all 6d rank-one twisted theories, both unity and vanishing blowup equations. We focus on the elliptic form, rather than the 5d form or geometric form of blowup equations, such that the twisted elliptic genera can be directly computed. Some unity blowup equations for some simple twisted theories have been studied in [50].
This paper is organized as follows. In Section 2, we give an overview on some salient features of 6d (1, 0) SCFTs and their twisted circle compactification. We will define twisted elliptic genera of the BPS strings and describe a fundamental quantity -the modular index. In Section 3, we generalize the elliptic blowup equations in previous works to the twisted cases and derive a recursive formula to compute the twisted elliptic genera efficiently. In Section 4, we focus on twisted one-string elliptic genera and study their universal features. In particular, we generalize the spectral flow symmetry of the one-string elliptic genera of 2d (0, 4) theories discovered by Del Zotto and Lockhart [28,31] to the twisted cases. In Section 5, we exploit the modularity of twisted elliptic genera, and propose the proper modular ansatz with modular group Γ 1 (N ) with N = 2, 3, 4. In Section 6, we discuss the Higgsing relations among untwisted/twisted 6d (1, 0) SCFTs. In Section 7, we summarize our results and point out some further directions.
Our conventions for simple Lie algebras and affine Lie algebras are the same with [43], see Appendix A therein. We often use su, so and sp for classical gauge algebras where sp(r) is equivalent to C r . We will also use A, B, C, D for more algebraic contexts. We frequently use q = e 2πiτ , v = e 2πi + and x = e 2πi − as multiplicative variables following [31], where ± = ( 1 ± 2 )/2. In this section, we briefly review some known results on the rank-one 6d (1, 0) SCFTs established in [4,51,52]. More extensive reviews can be found in e.g. [5,31,43].
The rank-one 6d (1, 0) SCFTs on the tensor branch are the natural elliptic lift of 4d N = 2 and 5d N = 1 gauge theories with 8 supercharges. They are geometrically engineered by compactifying F-theory on certain elliptic non-compact Calabi-Yau threefolds [53,54]. To be precise, these Calabi-Yau threefolds can be realized as elliptic fibration over some non-compact base surfaces O(−n) → P 1 . The self-intersection number −n of the base curve P 1 can only take values from 1 to 8 and 12. This n is also called the tensor coefficient. The Kodaira and Tate singularity type of the elliptic fibration gives the 6d gauge algebra G which is supported on the (−n) base curve. The 6d global flavor symmetry F on the other hand is supported on a non-compact curve intersecting with the (−n)-curve. The 6d matters, i.e., hypermultiplets in representation R sit at the intersection point between curves [55]. The (n, G, R) together are highly constrained by the Calabi-Yau condition. All possibilities have been classified in [4,51,52]. For example, there exist in total six pure gauge theories shortly denoted by n G as 3 su(3) , 4 so(8) , 5 F 4 , 6 E 6 , 8 E 7 and 12 E 8 . Together with a (7, E 7 , 1 2 56) theory, these are the rank-one non-Higgsable clusters which serve as the "atoms" to be linked together to build higher rank 6d (1, 0) SCFTs such as conformal matter theories [56]. Notably, the 4 so(8) theory can be extended to an infinite series of 6d (1, 0) SCFTs with n = 4 which are the so(r + 8) + rV theories. The full list of rank-one 6d (1, 0) SCFTs with (n, G, F, R) can be found in e.g. [31,Tables 20,21]. We collect those whose gauge algebra allows an outer automorphism i.e. type A, D and E 6 in Table 1, which will be our starting theories to perform twisted circle compactification.
Interestingly, it was noticed in [43] that all rank-one 6d (1, 0) SCFTs with tensor coefficient n, gauge algebra G and N i number of matters in representation R G i satisfy the following constraint Here Ind is the quadratic index of a representation. The identity shows that the combination in the left hand side depends only on the self-intersection number −n of the base curve. This value will be called the c constant in the current paper. The physical meaning of −c is the left-moving Casimir energy in the Ramond sector of one BPS string. It also has a geometric meaning in elliptic non-compact Calabi-Yau threefolds and can be computed from the intersection theory [16]. Later we will also propose an interesting generalization of the c constant for the twisted theories. The 6d (1, 0) SCFTs contain tensionless strings which we call BPS strings resembling the features of instantons in 5d N = 1 and 4d N = 2 gauge theories. Simple examples include E-strings which are realized by M2-branes stretched between a M5-brane and a M9-brane in the Horava-Witten picture of M-theory on S 1 /Z 2 . The worldsheet theories on k E-strings can be realized as a series of 2d (0, 4) O(k) quiver gauge theories [57]. The Estring theory is the simplest 6d (1, 0) SCFTs, which has no gauge symmetry but a E 8 flavor symmetry. It can be geometrically engineered by compactifying F-theory on local half-K3 Calabi-Yau threefolds. The E-string theory can be extended to two infinite series of 6d (1, 0) SCFTs with n = 1 which are sp(N ) + (2N + 8)F and su(N ) + (N + 8)F + Λ 2 theories. Another simple example of BPS strings is the M-strings which are realized by M2-branes stretched between two M5-branes [58]. In this case, the 6d supersymmetry is enhanced to (2,0) and the worldsheet theories become (0, 8). The worldsheet theories of k M-strings can also be realized as a series of 2d quiver gauge theories [58]. The M-string theory can be extended to an infinite series of 6d (1, 0) SCFTs with n = 2 which are su(N ) + 2N F theories. In general, the BPS strings in a 6d (1, 0) SCFT have worldsheet theories as rather nontrivial 2d (0, 4) SCFTs. Only in some special cases, these exist known 2d quiver gauge theory constructions. These include the four infinite series of 6d (1, 0) SCFTs with n = 1, 2, 4 mentioned earlier.
The 6d (1, 0) SCFTs usually contain three types of supermultiplets: the tensor, vector and hyper multiplets. As we are only interested in rank-one 6d (1, 0) SCFTs in the current work, there is always only one tensor multiplet with tensor coefficients n. For all rankone 6d (1, 0) SCFTs except E-string theory, there is a nontrivial gauge algebra G and the vector multiplets are in the adjoint representation Adj of G. When there is nontrivial matter content, the hypermultiplets are in the representation R of G. If we take into consideration the flavor symmetry F , the matter representations are often denoted as (R G , R F ) of the half-hypermultiplets. The partition function of 6d (1, 0) SCFTs contains three parts: the classical part, the one-loop part and the elliptic genera of BPS strings. The first two parts can be directly written down once the data (n, G, R) are known, while the elliptic genera are much more nontrivial and difficult to compute.
One main task in the study of 6d SCFTs is to compute the elliptic genera of the 2d Table 1: Gauge, flavor symmetries and matter contents of all rank-one 6d SCFTs [31] with gauge algebra allowing an outer automorphism. The subscript in a flavor symmetry indicates the level k F of the associated current algebra F . Matters are presented as the gauge and flavor representations of the half-hypermultiplets. The theories in gray have unpaired matter content upon Z 2 twist.
(0, 4) worldsheet theories of the BPS strings. In the past decade, a huge amount of effort has been made and plenty of methods have been developed, see the summaries in e.g. [41,43]. Nevertheless, there still remain quite some rank-one 6d SCFTs whose elliptic genera we could not compute to the extent we would like. The existing major approaches include 2d localization, modular bootstrap, elliptic blowup equations, topological vertex and brane webs and so on. Each has their merits and limitations. For example, 2d localization is the most efficient method for arbitrary number of strings yet only applicable to those cases with known 2d quiver gauge theory descriptions. Elliptic blowup equations imply recursion formulas for elliptic genera or BPS invariants yet only applicable to the cases without halfhyper. All these approaches have counterparts for twisted elliptic genera, which we will discuss in detail later. The circle reduction of 6d (1, 0) SCFTs produces the 5d N = 1 gauge theories with the same gauge group and matter content. For 6d (1, 0) SCFTs with n ≥ 3, by sending τ → i∞, i.e., q → 0, the k string elliptic genera of 6d SCFTs exactly reduce to the k instanton Nekrasov partition function of the 5d gauge theories. For the n = 1, 2 cases, there are some subtitles for the circle reduction such that the limit of elliptic genera and 5d Nekrasov partition function can have some small differences, which we refer to the discussion in [31,Section 7]. The circle reduction should not be confused with the circle compactification where all KK modes are kept. The circle compactification leads to 5d KK theories which are not necessarily gauge theories, while circle reduction leads to 5d gauge theories as deformation of 5d SCFTs.

Twisted circle compactification
It was conjectured in [7] that all 5d SCFTs can be obtained by RG flows from 5d Kaluza-Klein (KK) theories, while the KK theories can be obtained from the compactifications of 6d SCFTs. When a 6d SCFT is compactified on a circle, one can turn on non-trivial discrete holonomies for the gauge fields from the discrete global symmetries, which are realized in [10] as combinations of the outer automorphisms of gauge algebras G and permutations of tensor multiplets. Such a circle compactification is usually called the twisted circle compactification [10]. In this paper, we are interested in the twisted circle compactification of rank-one 6d (1, 0) SCFTs, with a single tensor multiplet which is invariants under any kind of discrete global symmetries, so the outer automorphism of the gauge algebra G determines the possible types of twist. In fact, such automorphisms have been classified in the study of twisted affine Lie algebras [59]. Denote O (rout) as the order r out outer automorphism. Then G = A 2r−1 , D r , E 6 admit order two outer automorphisms while G = D 4 admits an order-three outer automorphism which act on the simple roots in patterns as described in Figure 1.
Upon twisted circle compactification, the gauge algebra of affine Lie type G (1) in the tensor branch effectively becomes the twisted affine Lie algebra G (rout) . The vector multiplets are in the representation described by the roots of the twisted affine algebra, which are described by the representations of the finite dimensional subalgebraG obtained from outer automorphism folding of G with KK charge τ . The Dynkin diagram ofG is obtained by simply removing the affine node of the Dynkin diagram of G (rout) . Denote n G as the rank of the automorphism of G, for G = A 2r−1 , D r , E 6 , the inner automorphism is trivial, such that n G is equal to the rank of outer automorphism. The roots of G (n G ) are 2 : 2l : where∆ s and∆ l are the sets of short roots and long roots ofG. When G = A 2l , there is a nontrivial inner automorphism such that the whole rank of the automorphism is n G = 4, the roots of A 2r are where∆ s and∆ l are the sets of short roots and long roots of C r . We summarize all KK-momentum shifts of adjoint representations under twist in Table 2. We collect all 6d (1, 0) rank-one twisted theories with paired matter content in Table 3. Here by paired we mean that the twisted matter content is invariant upon KK-charge shift by 1/r out . For example, consider the n = 4, E 6 + 2F theory upon Z 2 twist, twisted matter content is F 0 ⊕ F 1/2 ⊕ 1 0 ⊕ 1 1/2 for F 4 , which apparently is invariant under KK-charge shift by 1/2. However, for n = 5, E 6 + F theory upon Z 2 twist, obviously one cannot make such an arrangement for the twisted matter content, thus we say unpaired. For the cases with unpaired matter content, we refer to the discussion in [60]. Those cases normally result in 5d KK theories with half-hypermultiplets.
For 6d SCFTs with hypermultiplets in the representations of the flavor algebra F , the representations have integer KK charges for a circle compactification without twist. For twisted circle compactifications, the hypermultiplets are in the representations of the sub flavor algebraF , with fractional KK charges. We refer to the Reference A of [50] for a detailed discussion. The twisted matter representations for all twisted 6d (1, 0) rank-one theories with paired matter contents are summarized in Table 3. For a twisted theory with gauge group G and non-trivial matter representations, they always take the form (2.8) where n G i is either the rank of outer automorphism r out or 1. We denote a representation with zero KK charge R i,0 as R i , and N i is the number of matters in the representation R i .

Twisted prepotential and one-loop free energy
The prepotential, which is also the classical part of the genus zero free energy of the corresponding topological strings, contains the tree-level and one-loop level contributions The tree level contribution contains the information of tensor multiplet, which should not be changed for the twisted circle compactification of rank-one theories. Table 3: Gauge algebra, matter representation and effective flavor symmetry for all twisted 6d (1, 0) rank-one theories with paired matter contents. HereR = (RG,RF ) and we only write downRG for short. The important value c will be discussed later.
action, we expect that where the O (rout) acts on the bilinear form m · m by identifying the masses in the orbit of O (rout) , such that it becomes the bilinear form of the algebraG/F . The O (rout) acts on k F i by multiplying it to kF i = n G i k F i , which can be understood as follows. For the case without twist, k F is the intersection number of the non-compact curve and the base curve [43]. When we do the outer automorphism twist, the non-compact curves that along the obit of the action O (rout) should be identified, which naturally changes the intersection number from k F i to kF i = n G i k F i . As suggested in [50], the one-loop prepotential can be evaluated from the zeta regularization of the summation over infinite roots or weights of the twisted affine algebra. For G (rout) not of type A (2) 2r , we have n G = r out , and the one loop prepotential can be formally written as k∈Z α∈∆s |α · mG + kτ /n G | 3 whereRG i are the representations of the matter contents with KK charge zero. Using the zeta regularization 1 the relevant parts in the one-loop prepotential become Then the total one-loop prepotential becomes (2.16) Here we define the positive weights as (2.17) and the constant c as The formal definition of zeta function ζ(s) = For the A (2) 2r cases, as described in (2.6), there are additional "shortest" roots taking the KK-charge n + 1 4 and n + 3 4 . They contribute an additional term which contributes to c by − 1 96 × 2 Ind(F) = − 1 48 . Therefore, for A (2) 2r theory with N KK zero mode matter in the fundamental representation, the one-loop prepotential takes the form of the last line in (2.16) with Here we have used that for G = C r , h ∨ G = r + 1, Ind(F) = 1 and Ind(Λ 2 ) = 2(r − 1). By explicit computation for all twisted theories, we observe the following interesting identities of the c constant. For all the cases with twist coefficients n G = 2, 3, 4 in Table 3, (2.21) The physical meaning of the constant c is (the negative of) the left-moving Casimir energy in the twisted Ramond sector which will be discussed later. In geometry, c can be absorbed by the base Kähler parameter. A similar shift of the base Kähler parameters has been discussed in [16], which is closely related to the intersection number of the divisors in the genus-one fibered Calabi-Yau threefolds. It is interesting to construct the geometry explicitly and reproduce the identity (2.21). In order to make connection to the blowup equation in Section 3, we need the information about the classical part of the genus one free energies F cls (0,1) and F cls (1,0) . As described in Section 2 of [43], these two functions only contain bilinear forms of the gauge and flavor algebra and the part related to the tensor multiplet. The action of the automorphism twist maps the bilinear forms to the bilinear forms of the folded algebras directly and leaves the tensor part unchanged. We expect that Notice that the dual Coxeter number h ∨ G in (2.23) is the number for the original group G or the twisted group G (r) , according to the identity This is easy to understand because the dual Coxeter number is the summation of all comarks of the affine Dynkin diagrams and the comark of each node of twisted affine Lie algebra just comes from the summation of the comarks of the nodes folded together.

Twisted elliptic genera of BPS strings
The Ramond-Ramond (R-R) elliptic genus of the BPS strings in 6d (1, 0) SCFTs is defined as the trace over the Hilbert space of the R-R sector of the 2d (0, 4) worldsheet theory: where m and K are the fugacities and the Cartan generators associated to the 2d global symmetry, which is composed of 6d gauge and flavor symmetries. The J 3 L , J 3 R and J 3 I are the usual Cartan generators of the little group so(4) = su(2) L ×su(2) R and the R-symmetry group su(2) I of the 6d (1, 0) SCFT. It is common to refer to the R-R elliptic genera as just elliptic genera. One can also consider the trace over the Hilbert space of the Neveu-Schwarz-Ramond (NS-R) sector of the 2d theory, in which case the above definition gives the NS-R elliptic genera. This type of elliptic genera will also be used in later sections when we discuss the spectral flow symmetry.
In the case of twisted circle compactification of 6d SCFTs, the 2d worldsheet theories also get twisted circle compactified on one circle of the torus. We can formally define the twisted elliptic genera by replacing the Hilbert space in (2.25) to the Hilbert space of the 2d states appearing in the twisted circle compactification. The Hamiltonians H L now have fractional eigenvalues due to the twist. For the twist coefficient n G = 2, 3, 4, the gap between energy eigenvalues becomes 1/n G . This brings in many new fascinating features for the twisted elliptic genera. We find the primary feature of d-string twisted elliptic genera is Here Z 5d d is the d-instanton Nekrasov partition function of the circle reduction, i.e., the 5d low energy theory of the twisted 6d (1, 0) SCFT. Such a 5d theory has gauge groupG and the 5d matter content taken from the KK-charge 0 part of the 6d twisted matter content.
When the 2d (0, 4) worldsheet theory has a known 2d quiver gauge theory construction, the above definition can be explicitly computed by 2d localization, also known as Jeffrey-Kirwan residue [25,26]. However, this good situation happens very rarely. In most cases, it is very hard or impossible to construct a 2d gauge theory for the worldsheet theory of BPS strings. For the twisted cases, this is even hard and rare. In this section, we review the 2d localization formulas for 6d so(2r + 8) (2) theories with n = 4 and pure su(3) (2) theory with n = 3, which were first established in [27]. As far as we know, these are the only two types of twisted theories, for which the twisted elliptic genera can be computed directly.
so(2r + 8) theory with Z 2 twist The instanton partition function of the so(2r + 8) (2) theory can be obtained from the Z 2 twist of 6d so(2r + 8) theory with 2r fundamental flavors. In the 2d N = (0, 4) quiver gauge theory description of the 6d so(2r + 8) theory, at k-strings, the resulting theory is a sp(k) gauge theory coupled to the bulk so(2r + 8) gauge group and the sp(2r) flavor group as follows sp(k) so(2r + 8) sp(2r) asym (2.27) Here solid/dashed lines denote 2d hypermultiplets/Fermi multiplets respectively. Under the Z 2 outer automorphism twist, the sp(k) gauge algebra and sp(2r) flavor algebra keep invariant, so we only need to take care of the bulk gauge group so(2r + 8). In the 2d description, the bulk gauge group serves as a flavor group and it couples with the gauge group sp(k) in the fundamental representation. Under Z 2 twist, the fundamental representation of so(2r + 8) is split into the fundamental representation of so(2r + 7) with KK charge zero and a trivial representation of so(2r + 7) with KK charge one half. The 6d partition function turns out to be [27,61] where E k is the k-string elliptic genus with the integrand to be where we define the variant theta functions ϑ i (z) = θ i (z, τ )/η(τ ), i = 1, · · · , 4. Here the ϑ 4 in the last line comes from the trivial representation of so(2r + 7) with 1 2 KK charge.
su(3) theory with Z 2 twist It was realized in [27] from brane webs that the Z 2 twisted circle compactification of 6d pure su(3) can be obtained from Higgsing of 6d G 2 gauge theory with one fundamental flavor. The 2d description of 6d G 2 theory with one fundamental has been constructed in [62], where the theory is written from the G 2 subalgebra su(3). Note the G 2 algebra contains a subalgebra su(2) × su (2). Denote α, α the Coulomb parameters for the su(2)'s, and m the mass for the fundamental flavor in the 6d G 2 theory, we have the following tuning of parameters for the Higgsing Apply the reparametrization (2.31), we have the k-string elliptic genus of 6d su(3) theory with Z 2 twist as where E k is the k-string elliptic genus with the integrand in the elliptic form to be The residue sum can be labeled by su(2) colored Young diagrams, then we have and Here s i < s j means (i < j) or (i = j and m i < m j ) or (i = j and m i = m j and n i < n j ). The h i (s) denotes the distance from s to the right end of the diagram Y i by moving right and the v j (s) denotes the distance from s to the bottom of the diagram Y j by moving down.

Anomaly and modular index
Elliptic genera E of 2d (0, 4) SCFTs in general are weight zero Jacobi forms of multi elliptic variables on SL(2, Z). They are equipped with an important quantity -the modular index Ind E, as a quadratic form of the elliptic variables. Under modular transformation of the torus, the elliptic genera transform as Equivalently, one can write as Here E 2 (τ ) is the weight-two Eisenstein series that measures the modular anomaly. For 6d rank-one (1, 0) theories, the modular index of the elliptic genera can be derived from the anomaly polynomials for the 2d (0, 4) SCFTs on the worldsheet of the BPS strings [63][64][65]. To be precise, for a 6d (1, 0) theory with tensor coefficient n, gauge group G and flavor group F , the modular index of the d-string elliptic genus can be uniformly written as (2.40) The modularity for twisted elliptic genera is more complicated. Though from the viewpoint of twisted circle compactification, it is convenient to discuss the fractional KKcharges, which brings in the fractional q 1/n G orders in twisted elliptic genera, where n G = 2, 3, 4. From the geometric viewpoint, it is more suitable to scale q to q n G such that we are still in the integral bases of curves. After such scaling, it is natural to expect that the twisted elliptic genera behave as weight zero Jacobi forms of some congruence subgroups of SL(2, Z). We propose that in general the congruence subgroup should be Γ 1 (n G ), though in many cases, we notice that the twisted elliptic genera satisfy a bigger modular symmetry that is Γ 0 (n G ). These are consistent with the geometric observation in [16] for multisection Calabi-Yau threefolds. We collect the definition of various congruence subgroups of SL(2, Z) in Appendix B.
The index quadratic form does not really depend on the modular groups. For O (rout) twisted compactification of rank-one SCFTs, the tensor multiplet is invariant under the twist, the gauge and flavor algebras become their twisted versions due to the identification of the masses in the same orbits of O (rout) . This indicates that the modular index of twisted elliptic genus can be directly deduced from its untwisted origin by identifying the masses of the particles of the hyper and vector multiplets in the same orbits of O (rout) . Thus we have the following uniform formula for the index of d-string twisted elliptic genus: (2.41) One can see that only the second line changes from (2.40). It should be emphasized that the dual Coxeter number h ∨ G here does not change upon the twist, as was explained in the identity (2.24).

Elliptic blowup equations and their twists
For refined topological strings on a non-compact Calabi-Yau threefold X, the general form of blowup equations was proposed in [66]: as a generalization of the K-theoretic blowup equations for 5d gauge theories in [45]. Here b 4 is the Betti number which counts the number of compact divisors of X. The t i is the Kähler parameter which is the volume of the curve class in H 2 (X; Z) and C ij is the intersection numbers of divisors and curves in X. The B i is the flux for the corresponding Kähler parameter, where the value can be determined from the classical prepotential of the topological strings on X [66]. The Λ( 1 , 2 , m i ) is a function that can be fixed from the fluxes B i and the classical prepotential, and it only depends on the mass parameters of the theory.
In a series of works [12,[40][41][42][43], elliptic blowup equations have been established for all 6d (1, 0) and (2, 0) SCFTs. These functional equations serve as very efficient tools to solve the elliptic genera of the BPS strings associated to 6d SCFTs. For example, for rank-one 6d (1, 0) SCFTs with n ≥ 3 and no half-hyper, there exist a universal recursive formula for the elliptic genera with respect to the number of strings derived from unity elliptic blowup equations [43]. In this section, we generalize both the elliptic blowup equations and the recursive formulas to the twisted cases. The partition functions of twisted circle compactification of 6d SCFTs can be written in terms of twisted elliptic genera as where F cls is the classical prepotential F cls = F cls (0,0) + F cls (0,1) + F cls (1,0) defined by (2.9), (2.22) and (2.23). The derivation of twisted elliptic blowup equations from (3.1) to the elliptic form is exactly parallel to the untwisted cases, by a "de-affinization procedure", thus we only present the results here. We refer readers interested in the derivation to Section 2.4 of [41] and Section 3.1 and Appendix D of [43].
Consider a rank one 6d SCFT with tensor branch coefficient n, gauge symmetry G, flavor symmetry F , and half-hypermultiplets transforming in the representations (R G , R F ). The flavor symmetry induces a current algebra of level k F on the worldsheet of BPS strings. Upon discrete twist, the twisted affine Lie algebra G (n) has truncated partG as low energy 5d gauge symmetry. In the meantime, matter representation becomesR and reduced flavor symmetry becomesF . Let λ 0 be a coweight base of G that is invariant upon the twist. 2 If (λ 0 , λ F ) gives admissible elliptic blowup equation for the original 6d SCFT, and let λF be the reduction of λ F , then we propose the twisted elliptic genera E d (τ, mG, mF , 1,2 ) satisfy the following twisted elliptic blowup equations: The Λ(δ) = 1 case is called unity blowup equations, while the Λ(δ) = 0 case vanishing. The parameter y is determined in [43] as which does not change upon twist. The Jacobi theta function θ i with characteristics a are defined in Appendix A. It comes from the contribution of the prepotential of 6d twisted theories. The subscript i is 3 if n is even and 4 if n is odd. For twist coefficient n G = 2, 3, the characteristic a of the theta function can be one of the following n numbers Recall N i are the number of hypers in RG i with KK-charge zero. This formula means that only the KK-charge 0 part is relevant for the characteristic a, which is required for the 5d limit of twisted elliptic blowup equations to be consistent with the 5d blowup equations with matters [49]. For twist coefficient n G = 4, the low energy gauge groupG = C r which needs special care. When there is no KK-charge 0 matter, the C r allows another possibility called the θ = π theory, in which case the h ∨ G in (3.6) needs to be replaced as h ∨ G − 1. This is also consistent with the 5d blowup equations in [49]. The one-loop vector-multiplet contribution AG V (τ, mG, λG) is defined as Equation (3.7) of [43], while the fractional part A f rac V (τ, mG, λG) is defined similarly with the fractional KK-charge taken into account. The one-loop hypermultiplet contribution AR H (τ, mG, mF , λG, λF ) is defined similar with Equation (3.8) of [43] with KK-charges taken into account. We collect the relevant formulas in Appendix A. We summarize all admissible unity twisted elliptic blowup equations in Table 4. We also collect some simple vanishing ones in Table 5. It can be expected that there will be more vanishing blowup equations for some theories. Besides, we will focus on the twisted theories with paired matter content here. The blowup equations and twisted elliptic genera for theories with unpaired matter content are more subtle, we leave the discussion in Appendix D. Table 4: The parameters y, λF of unity twisted elliptic blowup equations for rank one models. The # is the number of unity equations with a fixed characteristic a. To solve blowup equations, four methods have been presented in Section 4 of [43], which are recursion formula and Weyl orbit expansion for elliptic blowup equations, and refined BPS expansion and 1 , 2 expansion for general local Calabi-Yau threefolds. All four methods apply to the current twisted cases as well. In Section 3.3, we will explicitly present the recursion formula for twisted elliptic genera, which is the most efficient approach but only works for n ≥ 3 theories. We also use the Weyl orbit expansion to solve the twisted elliptic genera of many n = 1, 2 theories. Both methods utilize the unity part of (3.3). The vanishing part of (3.3) is less useful in solving twisted elliptic genera, but still gives some interesting vanishing theta identities which will be discussed in Section 3.4.
Blowup equations can even shed new light on the structure of 6d (1, 0) SCFTs itself. As mentioned earlier, it was found in [43] that for the modularity of elliptic blowup equations for 6d (1, 0) SCFTs to hold, the following constraint on tensor coefficient n, gauge algebra G and matter representations R need to be satisfied: Simply speaking, this constraint comes from the consistency requirement when converting the blowup equations of refined topological strings on non-compact Calabi-Yau threefolds to the elliptic form. For twisted elliptic blowup equations, we find there exists similar constraints depending on the type of twists. For Z 2 twist with n G = 2, we find 3 6 .

Modularity
The modularity of all elliptic blowup equations for rank-one 6d SCFTs has been proved in the Section 3.2 of [43]. The modularity of twisted elliptic blowup equations actually inherits from its untwisted origin, that is the index of each part is directly reduced from its untwisted origin. For example, as we have mentioned, the modular index of twisted elliptic genera can be reduced from the modular index of untwisted ones. Therefore, we will be brief and only show one example here. Consider the pure so(8) (3) theory with n = 4. From the general formula (3.3), we have the following unity twisted elliptic blowup equations for the twisted elliptic genera: Here the characteristic a = 0, ± 1 4 , 1 2 . Note the B field of the base (−4)-curve is even, which was already observed in [50, Section 6.1].
We now show how to prove the modularity of twisted elliptic blowup equations (3.12).
The classical part contributes to the index quadratic form as The following identities for the coroot lattice of G 2 are useful when computing the index from vector multiplets contribution: Then by the definition in Appendix B, we find the G 2 vector multiplet A G 2 V (τ, m, α ∨ ) contributes to index as To compute the index contribution from the fractional vector multiplets, we still need the following useful formulas for Then by the definition in Appendix B, we find the KK charge 1/3 and 2/3 parts A (3.20) From (2.41) we know the d-string twisted elliptic genus has index All together, we checked that given d = d 0 + d + d , the modularity of twisted elliptic blowup equation (3.12) holds, i.e.,

Recursion formula for twisted elliptic genera
In general, for n ≥ 3 and paired matter content, there exist a sufficient number of unity blowup equations which together give a recursion formula for the elliptic genera with respect to the string number d. For the untwisted situation, this has been discussed extensively in Section 4.1 of [43]. For the current twisted situation, the recursion formula is very similar. We omit the derivation and only state the results here. It should be noted that for n = 1, 2, although there is no explicit recursion formula, the elliptic genera still can be solved for many theories, see Section 4.2 of [43]. For simplicity, in this subsection, we first discuss the four pure gauge twisted theories, then move to the theories with matters. For the pure gauge twisted theories 6 , let us use the following shorthand notation for the classical term in blowup equations: where m α ∨ = m · α ∨ and m is the gauge fugacity forG. Furthermore, we define as well as (3.26) Specializing to d = 1, we obtain the following elegant formula for the twisted one-string elliptic genera of all four pure gauge twisted theories: Recall ∆ s denotes the set of short roots, while k denotes all fractional KK-charges of F appearing in the twist of adjoint representation. For example, for so (8) (3) , k takes values 1/3, 2/3.
For twisted theories with paired matters, we just need to add the hypermultiplet contribution to the above formulas. The classical term in (3.23) is replaced as with a fixed unity λ = λF . Then D d and D α ∨ {d 0 ,d 1 ,d 2 } are defined the same with the pure gauge cases (3.24), (3.25). The universal recursion formula for twisted d-string elliptic genera E d (mG, mF , 1 , 2 ) read Specializing to d = 1, we obtain the following universal formula for the twisted one-string elliptic genera: Here k are the KK-charges of the twisted matter content, and the w are the weights ofG and m f are the flavor fugacities. We use this formula to compute the twisted one-string elliptic genera of lots of 6d twisted theories. In most cases, our results are new.
Though by the recursion formula, one can compute the elliptic genera to arbitrary number of strings, we are particular interested in the reduced twisted one-string elliptic genera defined by The prefactor here comes from the well-known center of motion contribution in C 2 1 , 2 , see e.g. [28,31]. The simplicity of E red 1 lies in that it only depends on + but not on − . Since there is no room for confusion, in the following we often omit the term "reduced", and just say twisted one-string elliptic genera. The reduced twisted one-string elliptic genera exhibit many fascinating properties such as Γ 1 (N ) modularity and spectral flow symmetry, which will be discussed later.

Vanishing equations and vanishing theta identities
The vanishing elliptic blowup equations, although less constraining for elliptic genera than the unity ones, are still rather non-trivial functional equations. In particular, the leading degree of vanishing elliptic blowup equations does not involve contribution from elliptic genera, but only the classical and one-loop parts. Therefore, the leading degree equations usually give some interesting vanishing theta identities depending on the root and weight lattices of the 6d gauge algebras G, see many examples in [41,43]. In the twisted cases, we find many similar identities depending on the root and weight lattices of the truncated algebrasG. In this subsection, we will explicitly show some leading degree identities for the vanishing twisted elliptic blowup equations given in Table 5. We have checked these identities to sufficient high orders in the q expansions.
Let us first study the so(8) (2) cases, whereG = so(7) and the vanishing λ so (7) can take value in the dominant orbit O 1,6 of vector representation 7. For pure so(8) (2) theory with n = 4, we derive the following leading degree vanishing theta identity: Here a = ±1/8, ±3/8. It is easy to check for each w ∈ O 1,6 , the summand has index w which is invariant for the whole Weyl orbit. We checked this identity to high q orders. For n = 3, we have one vector hypermultiplet with mass m v and two spinor hypermultiplets with mass m s . Note ∀w ∈ O 1,6 and w ∈ 8 s , w · w = ±1/2. Thus the spinor hypermultiplets do not contribute to the leading degree vanishing theta identity. We then have Here y = m f + + and a = 0, ±1/3. It is easy to check for each w, the summand has is invariant for the whole Weyl orbit. We also checked this identity for general y to high q orders. In fact, for 6d (1, 0) so(8) (2) theories with n = 1, 2, 3, 4, we find the following unified formula for the leading degree vanishing theta identities: Recall i = 3 for even n and i = 4 for odd n.
Consider the so(2r + 8) (2) theories with n = 4, whereG = so(2r + 7) and the vanishing λ B r+3 can take value in the dominant orbit O 1,2(r+3) of the vector representation. In these cases, the vector hypermultiplets can contribute to the leading degree of vanishing blowup equations. To be precise, we find the following leading degree vanishing theta identity for general r: (3.35) Here a = ±1/8, ±3/8 and y i = m f i + + . We checked this identity for various r up to high q orders. More so type examples with Z 2 twist include the so(10) (2) theory with n = 2, for which we find the following leading degree vanishing theta identities: Here a = ±1/4. Besides, for so (12) (2) theories with n = 2, we find the following leading degree vanishing theta identities: We checked all these identities for general y i up to high q orders. Now consider the su(2r) (2) theories with n = 2 whereG = sp(r). First, for su(2) (2) theory, the leading vanishing identity is trivial. For su(4) (2) theory, the leading degree vanishing identity is for C 2 : where a = ±1/4 and O 1,4 is the dominant Weyl orbit in 5. We checked this identity to high q orders. For arbitrary r, it is easy to find the leading degree vanishing theta identities for C r can be uniformly written as Again a = ±1/4 and the O 1,2r is the dominant Weyl orbit in the Λ r representation of C r . Note each w ∈ O 1,2r intersect with all weights of Λ 2 by r(r − 1)/2 number of 1, r(r − 1)/2 number of −1, while the rest intersection numbers are zero. We have checked identity (3.39) for r = 2, 3, 4, 5 to high q orders.

Structure of twisted elliptic genera
We use the twisted elliptic blowup equations and the recursion formula (3.27) introduced in the last section to compute the twisted one-string elliptic genera of all twisted 6d (1, 0) SCFTs. These data enable us to study some universal features of the twisted elliptic genera. Many of these features are the generalization of those of the ordinary (0, 4) elliptic genera observed by del Zotto and Lockhart in [28,31]. According to the universal formula (2.26) and (3.31), the reduced twisted one-string R-R elliptic genera have the following form where Z 5d 1 is the reduced one-instanton partition function of the 5d circle reduction theory.
The different sectors of 2d SCFTs are interpolated by a spectral flow parameter η. When η ∈ Z + 1 2 , the spectral flow interpolates the NS sector with half-integer modes and the R sector with integer modes. For chiral primary |h, q of (2, 2) SCFT, the conformal weight h and charge q transform under spectral flow with general η as Here the c is the central charge of the 2d SCFT. We are interested in the η = 1 2 case. Using h = q/2, the spectral flow induces transformation Note the weight c 24 indicates the ground state of the R sector. This phenomenon suggests an interesting transformation between NS-R elliptic genera and R-R elliptic genera.
Similar phenomena appear in 2d (0, 4) SCFTs as well [28,31]. Let us focus on the 2d (0, 4) SCFTs of one BPS string in 6d (1, 0) SCFTs, possibly with twisted compactification. In general, the spectral flow from R-R sector to NS-R sector for the same 6d (1, 0) theory possibly with a twist is induced by the following transformation: On the other hand, from the viewpoint of (0, 4) NLSM, the NS-R elliptic genera are obtained by imposing anti-periodicity on the 2d chiral fermions. This suggests the following elegant phenomenon for the twisted one-string elliptic genera: the spectral flow transformation shifts the KK charges of all hypermultiplets by half. To be precise, we find that for twisted one-string elliptic genera of different sectors: Note this is even true for the untwisted cases, which explains the NS-R elliptic genera in [31] have simple low energy behaviors as 5d pure gauge theories. With this understanding, we know that the NS-R elliptic genera have similar expansion as (4.1), as long as both the c and Z 5d 1 are derived from the twisted matter content with all KK-charges shifted by half. When the twisted matter content is invariant under KK-charge shift by half, 7 the above two properties induce a nontrivial symmetry for the R-R elliptic genus itself, i.e., We have checked this symmetry for all admissible twisted theories. The prefactor on the right hand side does not involve any information on the twist. This means that the spectral flow symmetry is preserved upon twisted compactification.

The pure gauge cases
We first discuss the four pure gauge cases su (3) (2) , so(8) (2) , so(8) (3) and E (2) 6 . Denote θ and f as the weight generating the adjoint and fundamental representation respectively. We find that for 6d (1, 0) pure gauge G (n) twisted theories with twist coefficient N = 2, 3, 4, the reduced twisted one-string elliptic genera have the following universal expansion For the N = 2 cases, we further find that the q 1 term in the above expansion is χG 2f + χG θ + 2 + O(v 2 ). We also find the following interesting spectral flow symmetry: as a special case of (4.6). This resembles the spectral flow symmetry for the reduced one-string elliptic genera associated to untwisted 6d (1, 0) SCFTs studied in [28].

su(3) (2)
The 6d (1, 0) pure su (3) SCFT enjoys a series of fascinating 2d quiver constructions for the worldsheet theories of the BPS strings such that the elliptic genera are exactly computable to arbitrary number of strings [62]. The Z 2 twisted circle compactification gives the 5d su (3) gauge theory with Chern-Simons level 9 [6]. The blowup equations for this twisted theory have been studied before in [50, Section 3.2.3], which are consistent with our universal elliptic form. As we have reviewed, this twisted theory can be Higgsed from 6d (1, 0) G 2 + F theory [27], thus the twisted elliptic genera are also exactly computable to arbitrary number of strings. Here we provide a new observation that is the spectral flow symmetry of its twisted one-string elliptic genus. 7 For pure gauge theories, this is automatically satisfied.
For su(3) (2) , the low energy gauge algebra isG = su (2). Let us denote the reduced twisted one-string elliptic genus as We calculate g n up to n = 4 from the unity twisted elliptic blowup equations with characteristics a = 0, ±1/3. The results are in perfect agreement with the computations in [27,35,50]. For example, when turning off the su(2) fugacity, we have With the su(2) fugacity, we find The g 0 result shows that the leading q order of the twisted one-string elliptic genus gives the one su(2) instanton Hilbert series [68], which is expected since the circle reduction of the 6d su(3) (2) theory should be a pure su(2) theory with θ angle 0. We also have the following Table 6 for the coefficients b ij . The manifest symmetry of the coefficient matrix suggests the following spectral flow symmetry of the twisted one-string elliptic genus This resembles the spectral flow symmetry of the one-string elliptic genus of untwisted 6d su(3) theory observed in [28]. It is actually easy to prove this identity from the exact formula of E 1 in (2.35). Interestingly, we notice that the twisted elliptic blowup equations for su(3) (2) allow another solution for the twisted one-string elliptic genera if we set the characteristic a = 1/2, ±1/6. We call this as the sp(1) π case, as the low energy limit gives the one-instanton partition function of 5d N = 1 pure sp(1) π theory. In this case, combining together the twisted elliptic blowup equations and modular ansatz which will be discussed later, we solve the twisted one-string elliptic genus with the sp(1) fugacity turned off. Let us denote the reduced twisted one-string elliptic genus as  We calculate g π n up to n = 4. For example, (4.18) With the gauge su(2) fugacity, we find nθ+f v 2n = 2v 2 + 4v 4 + 6v 6 + . . . . This shows the leading q order of twisted elliptic genus E π 1 is indeed the 5d one sp(1) π instanton partition function. We also have the Table 7 for the coefficients b π ij . The manifest symmetry of the coefficient matrix shows that the solution E π 1 also satisfies the spectral flow symmetry (4.16). We regard this as further evidence that this serves as a good elliptic completion of 5d one sp(1) π instanton partition function. However, to push forward to two-strings, we meet some inconsistency when solving the blowup equations. It is not clear to us whether there would exist a Z 2 twist of the two-string elliptic genus of 6d (1, 0) pure su(3) theory that has low energy limit as 5d two sp(1) π instantons.

so(8) (2)
The Z 2 twisted circle compactification of 6d (1, 0) so(8) SCFT gives a non-Lagrangian 5d KK theory. The twisted elliptic genera can be exactly computed to an arbitrary number of strings by 2d localization [27]. The unity blowup equations for this twisted theory have been studied before in [50, Section 6.2], which are consistent with our elliptic form. Using  our universal E 1 formula (3.27), we calculate the twisted one-string elliptic genus for this so(8) (2) theory and find it in complete agreement with the 2d localization results. Let us denote the reduced twisted one-string elliptic genus of so(8) (2) as When turning off the so(7) fugacities, we obtain With the so (7) gauge fugacities, we have (7) nθ v 2n = v 4 + 21v 6 + 168v 8 + 825v 10 + 3003v 12 + . . . .

(4.24)
This is exactly the one so(7) instanton Hilbert series [68], thus agrees with the expectation that the circle reduction of the twisted theory should be a 5d pure so(7) gauge theory. Besides, we have f +nθ v 2n = 7v 4 + (105 + 7)v 6 + (798 + 105)v 8 + (3696 + 798)v 10 + . . . and g 1 = (27 + 21 + 2)v 4 + . . . . We also have the Table 8 for the Fourier coefficients b ij . The representations χ so(7) nθ are colored in orange. The manifest anti-symmetric coefficient matrix implies the following spectral flow symmetry  The Z 3 twisted circle compactification of 6d (1, 0) so(8) SCFT gives the 5d su(4) gauge theory with Chern-Simons level 8 [6]. The circle reduction on the other hand gives a 5d pure G 2 gauge theory. The worldsheet theories of the BPS strings for 6d so(8) (3) theory do not have 2d quiver descriptions, thus the computation of elliptic genera is quite nontrivial. The blowup equations for this twisted theory have been studied before in [50, Section 6.1], which are consistent with our elliptic form. There are in total four unity blowup equations and no vanishing one. Let us denote the reduced twisted one-string elliptic genus as From our universal E 1 formula (3.27), we calculate g n up to n = 4. For example, turning off the G 2 fugacities, we have (1 − v 2 ) 6 = 35v 3 + 301v 5 + 1372v 7 + . . . . Keeping the G 2 gauge fugacities, we find the following exact formulas by the infinite summations of G 2 characters The g 0 formula shows that the circle reduction of 6d so(8) (3) theory is indeed a 5d pure G 2 theory. We also have the Table 9 for the coefficients b ij , i, j = 0, 1, 2, . . . , where the coefficients χ G 2 nθ in g 0 in colored orange. From the obvious anti-symmetry coefficient matrix, we find the following spectral flow symmetry

Universal features with matters
In this section, we discuss the universal features of the reduced twisted one-string elliptic genera for twisted 6d theories with matters. Most of our observations are the twisted generalization of those in [31]. These include the spectral flow symmetry and the precise spectrum of the twisted R-R vacuum, NS-R vacuum and possibly the excited states with fractional KK-charges above the NS-R vacuum. For all reduced twisted one-string elliptic genera we solved from blowup equations, we analyze these features in the (q, v) expansion: 34) where N is twist coefficient. All coefficients c ij should be integers as they represent the states in the 2d worldsheet theories, in particular form representations ofG andF when turning on the fugacities. The b ij coefficients are slightly shifted from the c ij coefficients. As we have seen in the pure gauge cases, the b ij coefficients are very useful to show explicitly the spectral flow symmetry. Therefore, we will show the b ij coefficient matrix for all examples in the following.
The Z 2 twist of 6d (1, 0) so(2r + 8) + 2rV theory has low energy gauge algebraG = so(2r + 7) and twisted matter content 2rV 0 . The circle reduction gives a 5d N = 1 so(2r + 7) + 2rF theory whose 5d Nekrasov partition function is exactly computable by localization. On the other hand, the circle reduction of the NS-R sector gives a 5d N = 1 pure so(2r + 7) theory. For all n = 4, so(2r + 8) (2) theories with r ≥ 0, we use the recursion formula (3.30) to compute the one-string elliptic genera and find complete agreement with the 2d localization formulas. Let us study the following expansion for the reduced twisted one-string elliptic genera We observe the following patterns for the Fourier coefficients c ij : • c 0,j = 0 for j < 2r +4. This is consistent with the fact that the reduced one-instanton partition function of 5d so(2r + 7) + 2rF theory has v expansion starting from v 2r+4 .
The v expansion coefficients are colored orange in the Tables 11, 12 and 13.
These are the second excited states with integer modes and KK-charge 1 above the NS-R vacuum. The coefficients are colored purple in the Tables 11, 12 and 13. n = 4, so(10) (2) From the recursion formula (3.30), we compute the twisted one-string elliptic genus to q order 4 and find complete agreement with the 2d quiver formula. In particular, we obtain the coefficients b ij in Table 11. We checked that the coefficients satisfy all universal behaviors summarized earlier with r = 1.  Table 11: The coefficient matrix b ij for the E 1 of 6d so(10) (2) theory with n = 4. n = 4, so(12) (2) From the recursion formula (3.30), we compute the twisted one-string elliptic genus to q order 4. We obtain the following Fourier coefficients b ij in the (q, v) expansion in Table 12. We checked that the coefficients satisfy all universal behaviors summarized earlier with r = 2. n = 4, so (14) (2) From the recursion formula (3.30), we compute the twisted one-string elliptic genus to q order 4. We obtain the following coefficients b ij in the (q, v) expansion in Table 13. We checked that the coefficients satisfy all universal behaviors summarized earlier with r = 3.

n = 2, su(2r) (2)
The Z 2 twist of 6d (1, 0) su(2r) + 4rF theory has low energy gauge algebraG = sp(r) and twisted matter content 2r(F 0 + F 1/2 ) which is invariant under the KK-charge shift by 1/2. The circle reduction gives a 5d N = 1 sp(r) + 2rF theory whose 5d Nekrasov partition    function is exactly computable by localization. However, the twisted elliptic genera, albeit the simple look, do not to our knowledge have a 2d quiver gauge theory description. We utilize the blowup equations to compute the twisted one-string elliptic genera. For arbitrary r ≥ 1, the twisted elliptic blowup equations can have two possibilities for the characteristics a = ±1/4. From the unity twisted elliptic blowup equations, we solve the one-string twisted elliptic genera for r = 1, 2, 3, 4. We find the reduced twisted one-string elliptic genus has the following spectral flow symmetry We also find the following compact formula for the twisted one-string elliptic genus when turning off all gauge and flavor fugacities: (4.37) It is easy to prove the spectral flow symmetry from this expression. In the following, we explicitly show the results for r = 1, 2, 3. n = 2, su(2) (2) From the unity twisted elliptic blowup equations, we calculate the twisted one-string elliptic genus to q order 5. We can also use the 2d localization to compute the twisted elliptic genus in this case as the Z 2 twist for the gauge algebra su(2) is trivial. We only need to fold the four fundamentals. For one-string, we have We checked this agrees with our results solved from blowup equations to high q orders.
We also obtain the coefficients b ij in Table 14. The spectral flow symmetry manifests as expected. We also checked the spectral flow symmetry with all gauge and flavor parameters turned on. Notice the leading orders of both R-R and NS-R elliptic genera give the oneinstanton partition function of 5d su(2) + 2F. With gauge and flavor fugacities turned on, we have the following exact formula for the v expansion: Here the truncated flavor symmetry so(4) ∼ su(2) a × su(2) b .   (2) (2) theory with n = 2. n = 2, su(4) (2) From the unity twisted elliptic blowup equations, we compute the twisted one-string elliptic genus to q order 5. We obtain the coefficients b ij in Table 15. The obvious anti-symmetric coefficient matrix shows the self-duality under spectral flow as expected.
The leading orders of both R-R and NS-R elliptic genera should give the one-instanton partition function of 5d sp(2) + 4F. From ADHM construction, we obtain the following exact formula for the v expansion: where so(8) is the pertubative 5d flavor symmetry. The Fourier coefficients completely agree with the orange numbers in Table 15.  n = 2, su(6) (2) From the unity twisted elliptic blowup equations, we calculate the twisted one-string elliptic genus to q order 5. We obtain the coefficients b ij in Table 16. The obvious anti-symmetric coefficient matrix shows the self-duality under spectral flow. The leading orders of both R-R and NS-R elliptic genera give the one-instanton partition function of 5d sp(3) + 6F. From ADHM construction, we find the following exact formula for the v expansion: where so (12) is the pertubative 5d flavor symmetry. We checked that these coefficients completely agree with the orange numbers in Table 16.
To our knowledge, there is no 2d quiver gauge theory description in the current situation. Therefore, it is important to use blowup equations to solve the twisted elliptic genera and study their properties. Indeed, we successfully solve the twisted one-string elliptic genera for r = 1, 2, 3, 4 to high q orders. We find the reduced twisted one-string elliptic genus has the following spectral flow symmetry We also manage to find the following compact formula for the twisted one-string elliptic genus for arbitrary r: (4.43) We checked this formula for r = 1, 2, 3, 4 against the twisted elliptic genera solved from blowup equations and found perfect agreement. It is easy to prove the spectral flow symmetry from this expression. It is interesting to remark that the twisted elliptic blowup equations also allow nice solutions for the twisted matter content (2r+1)(F 1/4 +F 3/4 ). This choice of the KK-charges of the hypermultiplets F has its merit in that they coincide with those of the F in the twist of vector multiplet, i.e. Adj 0 + F 1/4 + F 3/4 + Λ 2 1/2 . This brings in some simplification that the B field of the tensor parameter becomes integral. In fact, there are two possibilities for such B field -even and odd, corresponding to two non-equivalent circle reductions to 5d N = 1 pure sp(r) 0 or sp(r) π theory. We leave the discussion for these situations in Appendix C. n = 2, su(3) (2) The Z 2 twisted circle compactification of 6d (1, 0) su(3)+6F theory gives a 5d rank-3 KK theory which has gauge theory description as 5d sp(2)+3Λ 2 or 5d so(5)+3V theory [69]. From the unity twisted elliptic blowup equations, we compute the twisted onestring elliptic genus to q order 5. The coefficients b ij are listed in Table 17. The obvious anti-symmetric coefficient matrix shows the self-duality under spectral flow. For the low energy limit, the 5d one-instanton partition function of su(2) + 3F theory can be computed by localization as where so (6) is the pertubative 5d flavor symmetry. It is easy to check that the v expansion coefficients are consistent with the orange numbers in Table 17. n = 2, su(5) (2) The Z 2 twisted circle compactification of 6d (1, 0) su(5) + 10F theory gives a 5d rank-4 KK theory which has gauge theory description as 5d so(7) + 5V theory [69]. From the unity twisted elliptic blowup equations, we compute the twisted one-string elliptic genus to q order 5. The coefficients b ij are listed in Table 18. The obvious anti-symmetric  coefficient matrix shows the self-duality under spectral flow. The 5d one-instanton partition function of sp(2) + 5F theory can be computed by localization as where so(10) is the pertubative 5d flavor symmetry. It is easy to check that the v expansion coefficients are consistent with the orange numbers in Table 18.
6 theory with n = 4. n = 3, so(8) (2) The Z 2 twist of 6d (1, 0) so(8) + V + S + C theory has low energy gauge algebraG = so(7) and twisted matter content 7 0 + 8 0 + 8 1/2 . From the recursion formula (3.30), we computed the twisted one-string elliptic genus to q order 5. We obtain the Fourier coefficients b ij in the (q, v) expansion in Table 20. We find the leading q order of the R-R sector, i.e., the orange coefficients gives the one-instanton Nekrasov partition function of 5d so(7) + V + S theory, while the leading q order of the NS-R sector, i.e., the red coefficients gives the one of 5d so(7) + S theory. For 5d so(7) + S theory, the ADHM description has been studied in [62]. For example, the reduced one-instanton partition function is given by . (4.47) Here u i satisfying u 1 + u 2 + u 3 + u 4 = 0 are the fugacities of su(4) embedded in so (7). From this formula, we find Z so(7)+S 1  (v, m so (7) , m sp (1) (7) nθ+s v 2n+5 . (4.49) This perfectly agrees with the leading q order of the NS-R twisted elliptic genus. For so(7) + V + S theory, we can compare with the reduced one-instanton partition function of 5d so(7) + V + 4S theory given in (H.15) of [31]. After decoupling three S, we find the resulting 5d partition function is (7) nθ+v+s v 2n+6 − χ so (7) nθ+v χ sp (1) (1)s + χ so (7) nθ+s χ This perfectly agrees with the leading q order of the R-R twisted elliptic genus that is when turning off all gauge and flavor fugacities: The Z 3 twist of 6d (1, 0) so(8) + V + S + C theory has low energy gauge algebraG = G 2 and twisted matter content 7 0 + 7 1/3 + 7 2/3 . From the recursion formula (3.27), we compute the twisted one-string elliptic genus to q order 11/3. In particular, we obtain the coefficients b ij in Table 21. We observe the leading q order of R-R elliptic genus gives the one-instanton partition function of 5d G 2 + F theory [31]: Besides, the leading order of NS-R elliptic genus colored red has coefficients χ G 2 nθ as the one G 2 instanton Hilbert series. The subleading order of NS-R elliptic genus colored blue has coefficients −χ G 2 f +nθ χ sp(1) (1) , which are the excited states over NS-R vacuum with KKcharge 1/3. The subsubleading order of NS-R elliptic genus colored cyan has coefficients (χ G 2 f + χ sp(1) (2) )χ G 2 nθ , which are the excited states over NS-R vacuum with KK-charge 2/3.  n = 2, so(8) (2) The Z 2 twist of 6d (1, 0) so(8) + 2(V + S + C) theory has low energy gauge algebraG = so(7) and twisted matter content 2(7 0 + 8 0 + 8 1/2 ). From the unity twisted elliptic blowup equations, we compute the twisted one-string elliptic genus E 1 to q 7 order. In particular, we obtain the following coefficients b ij in Table 22.  Our results are consistent with the 5d limits in both R-R and NS-R sectors. The leading q order of the NS-R sector gives the 5d so(7) + 2S theory whose 5d partition function can be computed by localization [62] or by 5d blowup equations [49]. We use the localization formula in [62] to compute the 5d one-instanton partition function as One can see the coefficients are in agreement with the red numbers in Table 22. One can also turn on the gauge and flavor fugacities, in which cases the Z 1 formula as v expansion can be found in [31,Equation (H.27)]. The leading q order of the R-R sector should give the 5d so(7) + 2V + 2S theory whose partition function to our knowledge has not been computed before. Luckily we can compare with the reduced one-instanton partition function of 5d so(7) + 2V + 6S theory given in [43,Equation (E.2)]. After decoupling four S, we find the resulting 5d partition function is (4.54) We checked that this completely agrees with leading q order of the R-R elliptic genus up to an overall minus sign: The Z 3 twist of 6d (1, 0) so(8) + 2(V + S + C) theory has low energy gauge algebraG = G 2 and twisted matter content 2(7 0 + 7 1/3 + 7 2/3 ). From the unity twisted elliptic blowup equations, we compute the twisted one-string elliptic genera E 1 to the order q 16/3 . We summarize the coefficients b ij in Table 23. The leading q order of the R-R elliptic genus should give the 5d partition function of G 2 + 2F theory. We compute the 5d one-instanton partition function of G 2 + 2F theory from the localization formula in [62] as We checked that the Fourier coefficients here are in agreement with the orange numbers in Table 23. The leading order of NS-R elliptic genus colored red has coefficients χ G 2 nθ as expected, since the circle reduction of the NS-R sector should be a 5d pure G 2 theory. We find the subleading order of NS-R elliptic genus colored blue has coefficients −χ G 2 f +nθ χ sp(2) (10) , which represent the first excited states with KK-charge 1/3 above the NS-R vacuum. Interestingly, we notice the diagonal elements in Table 23 are always zero, but we could not find an explanation for it. n = 2, so(10) (2) The Z 2 twist of 6d (1, 0) so(10) + 4V + 2S theory has low energy gauge algebraG = so(9) and twisted matter content 4V 0 + S 0 + S 1/2 . From the unity twisted elliptic blowup equations, we compute the twisted one-string elliptic genus E 1 to q 7 order. In particular, we obtain the Fourier coefficients b ij in the (q, v) expansion in Table 24. The leading q order of the NS-R sector should give the 5d so(9) + S theory. To our knowledge, 5d so(9) + S theory does not have an ADHM construction. Luckily, the exact v expansion formula of the one-instanton partition function of 5d so(9) + 2V + S theory has been This is in complete agreement with our leading q order of the NS-R elliptic genus whose coefficients are colored red in Table 24. Utilizing the Weyl dimension formula, we further find the following rational expression of v with all gauge and flavor fugacities turned off: On the other hand, the leading q order of the R-R sector should give the 5d so(9) + 4V + S theory. The exact v expansion formula of the one-instanton partition function of 5d so(9)+ 4V + 3S theory has been found in [43,Equation (E.6)]. By decoupling two S, we find the resulting 5d partition function is in agreement with the leading q order of the one-string R-R elliptic genus: up to an overall sign. The Fourier coefficients are colored orange in Table 24.
The Z 2 twist of 6d (1, 0) E 6 + 4F theory has low energy gauge algebraG = F 4 and twisted matter content 2(26 0 + 26 1/2 ) which is invariant under the KK-charge shift by 1/2. From the unity twisted elliptic blowup equations, we compute the twisted one-string elliptic genera E 1 to the q 3 order. We summarize the coefficients b ij in the (q, v) expansion in Table 25. From the obvious anti-symmetric coefficient matrix, we recognize that the E 1 is anti self-dual upon the spectral flow. Besides, the leading q order of E 1 should give the 6 theory with n = 2. n = 1, su(3) (2) The Z 2 twist of 6d (1, 0) su(3) + 12F theory has twisted matter content 6F 0 ⊕ 6F 1/2 which is invariant under KK-charge shift by 1/2. The circle reduction should give a 5d su(2) + 6F theory. The twisted circle compactification gives a highly nontrivial 5d KK theory with several 5d gauge theory descriptions which are 5d su(3) 4 + 6F, G 2 + 6F and sp(2) + 2Λ 2 + 4F theories [7]. To our knowledge, there is no 2d quiver gauge theory description for the twisted elliptic genera in this case. From the unity twisted elliptic blowup equations, we compute its twisted one-string elliptic genus E 1 to the order q 4 . We obtain the coefficients b ij in Table 26. The symmetry coefficient matrix indicates the self-dual spectral flow symmetry as expected. The 5d one-instanton partition function of su(2) + 6F theory can be computed as where so (12) is the pertubative 5d flavor symmetry and S and C are the spinor and conjugate spinor representations which both have dimension 32. One can see these coefficients are in total agreement with the orange numbers in Table 26.   (3) (2) theory with n = 1. n = 1, so(8) (2) The Z 2 twist of 6d (1, 0) so(8) + 3(V + S + C) theory has low energy gauge algebraG = so (7) and twisted matter content 3(V 0 + S 0 + S 1/2 ). From the unity twisted elliptic blowup equations, we compute its twisted one-string elliptic genus E 1 to the order q 7 . We summarize the Fourier coefficients b ij in Table 27.  The leading q order of the NS-R sector should give the 5d so(7) + 3S theory whose 5d partition function can be computed by localization [62] or 5d blowup equations [49]. We use the localization formula in [62] to compute the 5d one-instanton partition function as One can see these coefficients are in agreement with the red numbers in Table 27. The leading q order of the R-R elliptic genus should give the on-instanton partition function of 5d so(7) + 3V + 3S theory whose v expansion coefficients are colored orange. We are not aware that any other method can compute the partition function of 5d so(7) + 3V + 3S theory. n = 1, so(8) (3) The Z 3 twist of 6d (1, 0) so(8) + 3(V + S + C) theory has low energy gauge algebraG = G 2 and twisted matter content 3(7 0 + 7 1/3 + 7 2/3 ). The circle reduction gives the 5d G 2 + 3F theory. From the unity twisted elliptic blowup equations, we compute its twisted one-string elliptic genus E 1 to the order q 16/3 . We summarize the Fourier coefficients b ij in (q, v) expansion in Table 28. The leading q order of the R-R elliptic genus should give the 5d partition function of G 2 + 3F theory. We compute the 5d one-instanton partition function of G 2 + 3F theory from the localization formula in [62] as One can see these Fourier coefficients are in agreement with the orange numbers in Table 28 up to the first gauge singlet 1. On the other hand, the leading q order of the NS-R elliptic genus gives the 5d one G 2 instanton Hilbert series, as shown from the red numbers which are the χ G 2 nθ characters. The subleading q order of the NS-R elliptic genus has coefficients −χ G 2 f +nθ χ sp (3) (100) colored in blue in Table 28. These are the first excited states with KK charge 1/3 above the NS-R vacuum.

Modular bootstrap of the twisted elliptic genera
In this section, we utilize the modularity of elliptic genera to obtain some all order results beyond the q expansion. This compensates the results of twisted elliptic genera for n = 1, 2 twisted theories where from elliptic blowup equations we can only solve E 1 as q expansion but cannot have a compact formula. The modular bootstrap approach views the elliptic genera as Jacobi forms on certain modular groups, and utilizes the finite generation property of modular forms and Jacobi forms to obtain a compact modular expression of elliptic genera which works for all q orders.

The modular ansatz for twisted elliptic genera
For a 6d (1, 0) SCFT with gauge group G and tensor coefficient n, the modular ansatz for its reduced one-string elliptic genus was proposed by Del Zotto and Lockhart in [31] as Here all gauge and flavor fugacities are turned off, and only + serves as the elliptic parameter of the Jacobi form. The δ n,1 comes from the special phenomenon of n = 1 theories, where the leading q order of elliptic genus is always trivial, and the 5d theory information only emerges from the subleading q order. Utilizing several other constraints, mostly from the universal features of the leading order of R-R and NS-R elliptic genera, [31] successfully determined the modular ansatz for most rank-one theories. The modular ansatz for several remaining theories was determined in [43] with the help of elliptic blowup equations. We would like to find a generalization of (5.1) for the reduced twisted one-string elliptic genera. An inspiration comes from the recent study on the modularity of topological strings on N -section Calabi-Yau threefolds [16,20,21]. The modular ansatz for the topological string partition function on such geometries was first proposed in [16]. Combining (5.1) and the results in [16] together, we propose the following modular ansatz for the reduced one-string elliptic genus for twisted 6d (1,0) theories with twist coefficient N = 2, 3, 4: Recall the c is the c constant of twisted theories defined in (2.21) that depends only on the tensor coefficient n and twist coefficient N . The ∆ 2N are some Γ 0 (N ) cusp forms defined in Appendix B. The numerator N (τ, + ) is of weight 6(n − 2) + 2N s + 12δ n,1 − 2h ∨ G and index 4(h ∨ G − 1) + n − h ∨ G . The N (τ, + ) usually has fractional q 1/N orders thus it is convenient to scale q 1/N to q. Then we expect N (N τ, + ) to be a Γ 1 (N ) weak Jacobi form with positive integer index. By the finite generation property of weak Jacobi forms [70]:, we have Here M (N ) denotes the ring of modular forms on Γ 1 (N ). The φ −2,1 (τ, z) and φ 0,1 (τ, z) are the well-known Eichler-Zagier generators for weak Jacobi forms whose expressions are collected in Appendix B. The s here measure the difference between the twisted c constant and the untwisted one and is related to a geometric quantity r β = N s which is always integral [16]. Interestingly, we find that except for the n = 1, so(8) (3) twisted theory, the modular ansatz of all twisted one-string elliptic genera encountered in the current paper satisfy a bigger congruence subgroup that is Γ 0 (N ). We collect the definition and modular generators for Γ 0 (N ) and Γ 1 (N ) in Appendix B.
Some more explanation for the N = 4 cases are needed. We notice that for some theories with twist coefficients 4, it is possible that besides the Γ 1 (4) elements from ∆ 8 , there can be extra Γ 1 (2) elements. In such case, the ∆ 8 ( τ 4 ) s in (5.2) need to be extended to ∆ 8 ( τ 4 ) s 1 ∆ 4 ( τ 4 ) s 2 . This suggests that the associated Calabi-Yau geometries contain both 4-section and 2-section components.
We collect in Table 29 the relevant data for the modular ansatz for all rank-one twisted theories. The # means the number of independent parameters to be fixed in the numerator N . The n = 2, so(12) (2) theory is marked with * because we do not have enough data to fix the modular ansatz, as it involves half-hyper. Except for this theory, we successfully fix its modular ansatz for all other theories in Table 29 and check the ansatz against the results from twisted elliptic blowup equations to high q orders.

Computational results
We pick some interesting theories to explicitly show the modular ansatz results. The results for other theories in Table 29 can be shared to interested readers upon request. n = 3, su(3) (2) For 6d pure su(3) (2) theory studied in Section 4.2.1, let us first discuss the sp(1) 0 case. From the general formula (5.2), we have the following modular ansatz for its reduced twisted one-string elliptic genus Here N (τ, + ) is of weight 0 and index 4. Interestingly, we notice that in this case the ∆ 8 (τ /4) 1 4 has taken care of all the Γ 0 (4) elements such that N (τ, + ) contains no q 1/4+n/2 orders, i.e., N (2τ, + ) is a Γ 0 (2) Jacobi form. Using the generators E 2 (τ ) (2) , E 4 (2τ ) and φ −2,1 (2τ, + ), φ 0,1 (2τ, + ) given in Appendix B, there are 9 parameters to fix the ansatz of N (2τ, + ). We find the ansatz can be determined by the known Fourier coefficients of q 0,1,2 of N (2τ, + ) as We then check the modular ansatz results to q 8 order. Here φ −2 , φ 0 are the short notation of φ −2,1 (2τ, + ), φ 0,1 (2τ, + ). On the other hand, if we regard N (4τ, + ) as a Γ 0 (4) Jacobi form, there will be 15 coefficients to fix N (4τ, + ) using E 2 and E 2 given in Appendix B as modular generators. For the sp(1) π case, the modular ansatz takes the same form as (5.5) and the N (τ, + ) is still of weight 0 and index 4. Amusingly, we find in this case the N (2τ, + ) is again a Γ 0 (2) Jacobi form which we determine to be This numerator is still fixed by the known Fourier coefficients of q 0,1,2 and then checked to q 8 order against the twisted elliptic blowup equations.
For 6d pure E 6 theory, the general formula (5.2) gives the following modular ansatz for its reduced twisted one-string elliptic genus Here N (τ, + ) is of weight 0 and index 26. The N (2τ, + ) should be a Γ 0 (2) Jacobi form.
Using the generators E 2 (τ ) (2) , E 4 (2τ ) and φ −2,1 (2τ, + ), φ 0,1 (2τ, + ), we find there are 196 coefficients to fix N (2τ, + ). Indeed we find they can be fixed from the data up to q 13 . We then check the modular ansatz results against the twisted elliptic genera solved from the recursion formula to q 14 . The explicit formula for N (2τ, + ) is too long to show here.

E-string
The elliptic genera of E-strings have been studied in [57,[71][72][73][74]. For a 6d theory with trivial gauge group in the tensor branch, there is no discrete symmetry from the automorphism of the gauge algebra. However, one can still consider discrete symmetries of the flavor algebra. A typical example is the E-string theory, where the flavor symmetry is the exceptional group E 8 , for which we may find a rich class of discrete subgroups. The twisted circle compactification with such a discrete symmetry shall lead to a theory whose partition function is the same as the partition function of E-strings on a circle with a special choice of the Wilson line parameters. At first glance, it looks like these theories are boring, but as have been studied in [16,20], their geometries, which are genus-one fibrations with N -sections, have very rich structures. Thus it is worthy to have a study on them. For example, let us do a Z 2 twist to E-string theory formally. The twisted one-string elliptic genus is just Turning off the flavor parameters, the reduced twisted one-string elliptic genus is independent from + and has the following nice modular ansatz as a special case of our general formula (5.2): 14) It is easy to prove this identity. This has been also studied in the setting of Calabi-Yau threefolds with 2-sections in [16]. n = 2, su(2) (2) This case is similar to the E-string theory, where the Z 2 twist is only performed on the flavor parameters. From the general formula (5.2), we find the following modular ansatz . (5.15) Here N (τ, + ) is of weight −2 and index 4. In the case, the N (2τ, + ) is a Γ 0 (2) Jacobi form. We fix it to be Recall φ −2 and φ 0 are short for φ −2,1 (2τ, + ), φ 0,1 (2τ, + ). We have checked this modular ansatz against the localization formula (4.38) to O(q 20 ). In fact, we find an even simpler form for the numerator: Here we notice that E In summary, we find the following compact formula for the twisted one-string elliptic genus: From the general formula (5.2), we have the following modular ansatz for its reduced twisted one-string elliptic genus . (5.21) Here N (τ, + ) is of weight −2 and index 3. We find that unlike the pure su(3) (2) case, now the N (τ, + ) does contain quarter q orders. Therefore, there is no longer simplification to Γ 0 (2), i.e., the N (4τ, + ) should be a genuine Γ 0 (4) Jacobi form. Using the Γ 0 (4) modular generators E 2 (τ ) (2) , E 2 (τ ) and φ −2,1 (4τ, + ), φ 0,1 (4τ, + ) given in Appendix B, we find there are 6 parameters to fix the modular ansatz. By the known coefficients of N (4τ, + ) up to q 6 , we determine it to be Here φ −2 and φ 0 are short for φ −2,1 (4τ, + ), φ 0,1 (4τ, + ). We then check the modular ansatz against the results from blowup equations to q 16 . In fact, we observe an even simpler form for the numerator: Here we notice that 2 )φ −2 − 4φ 0 = −48h(τ, + ). (5.25) In summary, we find the following compact formula for the twisted one-string elliptic genus: (5.26) n = 2, su(5) (2) From the general formula (5.2), we have the following modular ansatz for its reduced twisted one-string elliptic genus Here N (τ, + ) is of weight −4 and index 5. We find the N (4τ, + ) should be a Γ 0 (4) Jacobi form. Using the Γ 0 (4) modular generators E 2 (τ ) (2) , E 2 (τ ) and φ −2,1 (4τ, + ), φ 0,1 (4τ, + ), we find there are 10 parameters to fix the modular ansatz. By the known coefficients of N (4τ, + ) up to q 4 , we determine it to be Here φ −2 and φ 0 are short for φ −2,1 (4τ, + ), φ 0,1 (4τ, + ). We then check the modular ansatz against the results from blowup equations to q 12 . n = 1, su(3) (2) The twisted one-string elliptic genus has been solved from blowup equations in early sections and the Fourier coefficients have been shown in Table 26. From the general formula (5.2), we have the following modular ansatz . (5.29) Here N (τ, + ) is of weight 0 and index 2. Note there are both ∆ 8 and ∆ 4 which indicates that both Γ 0 (4) and Γ 0 (2) play a role. The N (4τ, + ) is a genuine Γ 0 (4) Jacobi form.
Using the Γ 0 (4) modular generators E 2 (τ ) (2) , E 2 (τ ) and φ −2,1 (4τ, + ), φ 0,1 (4τ, + ) given in Appendix B, we find there are 6 parameters to fix for the modular ansatz of N (4τ, + ). Indeed, they are fixed by the known q 0,1,2 coefficients. We have n = 1, so(8) (3) In the end we show one example of Z 3 twist which is the only case we encounter in the current work that the modular group must be Γ 1 (N ) instead of Γ 0 (N ). This is the so(8) (3) theory with n = 1. The general formula (5.2) gives the following modular ansatz for its reduced twisted one-string elliptic genus Here N (τ, + ) is of weight −3 and index 7. Due to the odd weight, the N (3τ, + ) must be a Γ 1 (3) Jacobi form instead of a Γ 0 (3) one. Using the generators E 2 (τ ) (3) , 3 (τ ) and φ −2,1 (3τ, + ), φ 0,1 (3τ, + ) given in Appendix B, we find there are 26 coefficients to fix N (3τ, + ). Indeed they can be fixed from the data up to q 3 up to the vanishing relations (B.12). We have We then checked it to q 11 order against the twisted elliptic blowup equations and found perfect agreement.

Full modular ansatz with gauge fugacities
It is also interesting to consider the full modular ansatz with gauge fugacities. For untwisted 6d (1, 0) SCFTs, this has been studied in [30] for pure su(3) and so (8) theories, see also [32,75]. The denominator of the modular ansatz of reduced one-string elliptic genus involves the block α∈∆ + l (G) θ 1 (m α ± 2 + ). (5.33) This is natural as all the poles of elliptic genera are associated to the 5d states related to the long roots of G. Analogously for twisted theories, given the understanding on 5d circle reduction theory, it is reasonable to expect the the denominator of the modular ansatz for twisted one-string elliptic genera involves the block where ∆ + l is the long positive roots ofG. More precisely, we propose the following full modular ansatz for the reduced one-string twisted elliptic genera: where the s is defined the same as in (5.3). The φ −1,1/2 (τ, z) := φ −2,1 (τ, z) 1/2 is a Jacobi form with weight −1 and index 1/2. The weight and index of N (τ, + , mG, mF ) should be coordinated with the weight 0 and index (2.41) of the E 1 (τ, + , mG, mF ). In general, for twist coefficient N , the N (N τ, + , mG, mF ) should be a Γ 1 (N ) Jacobi form of multi elliptic variables. In principle, one can fix the numerator by the M * (N ) modular generators, the φ −2,1 (N τ, + ), φ 0,1 (N τ, + ) generators, the generators ofG Weyl invariant weak Jacobi forms and the generators ofF Weyl invariant weak Jacobi forms all together. We give a simple example here, which is the pure su(3) (2) theory with n = 3. The low energy algebra isG = sp(1). We have the following anstaz for the reduced one-string elliptic genus with sp(1) fugacity m as . (5.36) Here N (τ, + , m) has weight 0 and index 4 for + and index 1 for m. We find the N (4τ, + , m) is a Γ 0 (4) Jacobi form with two elliptic variables. Using the Γ 0 (4) modular generators E 2 (τ ) (2) , E 2 (τ ) and φ −2,1 (4τ, + ), φ 0,1 (4τ, + ) and φ −2,1 (4τ, m), φ 0,1 (4τ, m) given in Appendix B, we find there are 35 parameters to fix for the modular ansatz of N (4τ, + , m). Indeed, they are fixed by the known coefficients up to q 5 . We have 2 )φ −2 φ 3 0 + 256φ 4 0 .
Most previously known examples are recognized from brane webs. In particular, many examples of twisting from Higgsing of so type with n = 2, 3, 4 were discussed in [38]. In this section, we systematically study all possible twisting from Higgsing among rank-one theories and propose a simple method to obtain the precise Higgsing condition that does not rely on brane webs, but only on Lie algebra representations and their decompositions. A primary condition to establish a Higgsing is that the two theories must have the same tensor coefficients n. Suppose we want to establish a Higgsing from an untwisted theory with gauge group G to a twisted theory G (n) with low energy gauge groupG. Our trick is to perform the decomposition G →G × H res . (6.1) Here the residue group H res is either su (2) or so(2) for Z 2 twist, or su(3) for Z 3 twist. The Higgsing to twisted theory can be achieved by discretizing H res , i.e., to take its continuous fugacities as some fractions of τ . In the meantime, some mass parameters of the hypermulitplets of the untwisted theory must be taken as some delicate linear combinations of + and τ to produce the correct one-loop partition function of the twisted theory. We find all previously known examples of twisting from Higgsing fall into this paradigm. For example, the Z 2 twisted pure su(3) can be obtained from Higgsing of G 2 + F theory. Here we show this from a purely algebraic viewpoint. Consider the decomposition G 2 → su(2) × su (2), we have the following representation decompositions The Higgsing process can be realized by simply discretizing the second su (2), which we have presented in (2.31). To check the one-loop part, it is only necessary to study the function f ( + , m G , m F , q) inside the vector multiplet partition function Under analytic continuations, we have Here we have dropped those gauge singlets by ∼. This computation shows that the Higgsing indeed gives the required one-loop part of the twisted su(3) (2) theory. A known infinite series of twisting from Higgsing is from so(2k + 9) + (2k + 1)V to the Z 2 twist of so(2k + 8) + 2kV with k = 0, 1, 2, . . . . This type of Higgsing has been discussed from the viewpoint of brane webs in Section 5 of [38]. Since the low energy gauge algebra of so(2k+8) (2) is so(2k+7), we can consider the decomposition so(2k+9) → so(2k+7)×so (2). Let us just regard the so(2) as u(1). It is useful to remark the following representation decompositions To be precise, we find the Higgsing condition is Here we have used the orthogonal bases of so(2n + 1) algebras such that the character of vector represention is χ V = 1 + n i=1 Q ±1 i . During the decomposition m u(1) = 2 log(Q k+4 ). For the one-loop function, we have This shows that the above Higgsing indeed produces the correct one-loop part of the so(2k + 8) (2) twisted theory. It is also easy to check the elliptic genera obtained from the above Higgsing is precisely the same with expression from 2d localization. The Higgsing trees for Z 2 twisted so theories with n = 2, 3, 4 have been mostly studied in [38] using brane webs. We find more examples by our algebraic procedure, and collect the n = 4 Higgsing tree in Figure 2, n = 3 Higgsing tree in Figure 3 and n = 2 Higgsing tree in Figure 4. For Z 2 twisted so theories with n = 1, it is not easy to find the brane webs. We use our new method to propose the n = 1 Higgsing tree in Figure 5.  Our method can also be used to rule out some potential Higgsing. For example, we notice that the n = 2, su(N ) theory cannot be Higgsed to n = 2, su(N − 1) (2) twisted theory. The reason is that the Adj and Λ 2 of su(N ) always have the same KK charge 0 under representation decompositions, thus can not produce the required one-loop function of the su(N − 1) (2) twisted theory.
The Higgsing of elliptic blowup equations for 6d (1, 0) SCFTs have been discussed in Section 3.3 of [43]. For the twisted cases, the Higgsing is just similar. The Higgsing conditions can be taken directly in the elliptic genera as well as the (twisted) elliptic blowup equations, at least for the unity ones. It is easy to check that the characteristic a and value y of elliptic blowup equations are consistent with the Higgsing.
As a final remark, some 6d E 6 theories can also be Higgsed from conformal matter theories. For example, it was found in [39] that the n = 2, E 6 theory can be obtained from a special Higgsing of the minimal (E 7 , E 7 ) conformal matter theory, while the n = 5, E (2) 6 theory can be obtained from a special Higgsing of extended (E 7 , E 7 ) theory.
One more interesting example of twisting from Higgsing is for the Z 3 twisted theories. In [39], it was found that the n = 4, so(8) (3) theory can be obtained from a special Higgsing of the minimal (E 6 , E 6 ) conformal matter theory, while the n = 2, so(8) (3) theory can be obtained from a special Higgsing of non-minimal (E 6 , E 6 ) 2 conformal matter theory. We notice that in general, the rank-one so(8) (3) theory can be Higgsed from the rank-one E 6 theory with the same tensor coefficient n. Let us first consider the n = 4 case, i.e. Higgsing E 6 + 2F to pure so(8) (3) . To write down the precise Higgsing condition, it is useful to consider decomposition E 6 → su (3) For the one-loop function, we have This shows that the Higgsing indeed produces the correct one-loop function of pure so(8) (3) theory. For n = 3, we can Higgs E 6 + 3F → (so(8) + V + S + C)/Z 3 . The Higgsing condition is precisely (6.15) combined with m 3 = m sp(1) + τ /3. For the one-loop part, we have The same applies to all Higgsing to twisting E 6 + (6 − n)F → (so(8) + (4 − n)(V + S + C))/Z 3 , n = 4, 3, 2, 1. (6.19) 6.1.3 so(7) → su(4) (2) Consider the n = 2 Higgsing from so(7) + V + 4S to the Z 2 twist of su(4) + 8F. This twisting from Higgsing has been found in [38] from brane webs. Here we adopt a purely algebraic approach. Let us consider the decomposition so(7) → sp(2) × so (2). Regarding the so(2) as u(1). We have the following representation decompositions We find the Higgsing to twisting can be achieved by discretizing the u(1) by the following condition 10 + χ sp(2) 5 Thus we successfully reach the one-loop function of the Z 2 twist of n = 2, su(4)+8F theory.
We find the Higgsing can be taken by discretizing the su(2) into Z 2 : Obviously, this Higgsing condition also gives the correct modular index in (6.22). For the one-loop function, we have This gives exactly the one-loop function of su(2r − 1) (2) twisted theory.

Summary and outlook
In this paper we studied the 2d (0, 4) SCFTs of BPS strings associated with the twisted circle compactification of all 6d rank-one (1, 0) SCFTs. The twisted elliptic genera of such 2d theories exhibit many extraordinary properties, which above all are classified by twisted affine Lie algebras. We established the functional equations of the twisted elliptic genera, called twisted elliptic blowup equations, which are the generalization of elliptic blowup equations developed in recent years. This powerful tool enables us to calculate twisted elliptic genera for most rank-one theories from twisted compactification. Although we focused on the one-string case, the recursion formula from twisted elliptic blowup equation allows us to compute the twisted elliptic genera of arbitrary number of strings. We also investigated the modular ansatz of the twisted one-string elliptic genera and found there is naturally a Γ 1 (N ) modular structure, where N = 2, 3, 4 is just the twist coefficients of the twisted affine Lie algebras. This is directly connected to the underlying N -section Calabi-Yau geometries, which are some genus-one fibered Calabi-Yau threefolds, whose blowup equations after converting to gauge theory language are just the twisted elliptic blowup equations. Our blowup equations can also solve the refined BPS invariants of these Calabi-Yau geometries. We further studied the generalization of spectral flow symmetry proposed in [28,31] to the twisted case. We found the spectral flow between R-R and NS-R elliptic genera of one BPS string nicely fits into the twisted situation where the KK charges are naturally shifted by half. In many cases such as the four pure gauge cases, this implies an extra symmetry of the twisted elliptic genera. For theories with 2d localization formulas such as all n = 4, so(2r + 8) (2) theories, such spectral flow symmetry can be derived explicitly.
In [28], Del Zotto and Lockhart conjectured a surprising relation between the one-string elliptic genera of 6d (1, 0) pure gauge G SCFTs and the Schur indices of 4d N = 2 H G SCFTs for G = su(3), so(8), F 4 , E 6,7,8 . Though still mysterious, this relation has also been shown to exist to some extent for multi-string cases [41]. It is intriguing to consider whether the twisted elliptic genera of the four pure gauge cases discussed in the current work, i.e., su(3) (2) , so(8) (2) , so(8) (3) , E (2) 6 are related to the Schur indices of some 4d SCFTs, possibly with defects. This relies on certain decompositions of the twisted elliptic genera as infinite copies of certain simpler functions, similar with those in [28]. Besides, by SCFT/VOA correspondence, the Schur indices of H G SCFTs are equivalent to the vacuum characters of VOA (G) −h ∨ G /6−1 . Thus we suspect in the twisted case, the VOA (G (n) ) −h ∨ G /6−1 will also play a role. Notably, the VOA (su(3) (2) ) −3/2 has been recently discussed in [76].
One more fascinating structure of the one-string elliptic genera of 6d (1, 0) SCFTs with tensor coefficient n and gauge group G (possibly with matter content) is an elegant decomposition found in [31] involving the characters of affine Lie algebra G (1) at negative level −n, see the Equations (1.6) and (1.7) there and some recent results in [77]. Presumably, the twisted elliptic genera we investigated in the current paper should have an analogous decomposition involving the characters of twisted affine Lie algebras at negative levels. We hope to address this issue in the future.
In this paper, we have limited ourselves to the twisted compactification by folding vector multiplets in gauge algebra G, which is closely related to twisted affine Lie algebras. As mentioned earlier, it is well-known that there exists another type of twist, that is folding tensor multiplets. This can happen when a higher-rank 6d SCFT exhibits some discrete symmetry in its quiver structure. This type of twisted compactification also gives many interesting 5d KK theories. It should be interesting to study as well the twisted elliptic genera in this setting. In particular, for 6d (2, 0) SCFTs, this kind of twisted elliptic genera has been studied in [12]. Besides, one can even consider the twisted elliptic genera associated to the twisted circle compactification of 6d little string theories which has drawn some interests recently [78][79][80]. We expect many methods developed in the current work can be extended to the twisted elliptic genera of little string theories. We can also study 6d SCFTs with defects. There are two types of defects with codimension two and codimension four, which play important roles in the study of the elliptic quantum Seiberg-Witten curves [61,81,82]. See [83][84][85] for other approaches to the elliptic quantum Hamiltonians. The blowup equations for Wilson loops/surfaces and codimension four defect partition functions have been proposed in [86] for generic 5d/6d theories on R 4 × S 1 and R 4 × T 2 . It is also interesting to extend the (elliptic) blowup equation to theories with codimension two defects, and study the modular expressions of the (twisted) elliptic genera. See [87,88] for the blowup equation for codimension two defects in 4d. The solution of the defect partition functions would help to bootstrap new elliptic quantum Seiberg-Witten curves that are corresponding to 6d gauge theories with and without twist.
2 (τ ), E 4 (4τ ), E 6 (4τ ) . (B.8) The subscripts are the weights of the modular forms. Note for N = 3, 4, the generators are not algebraically independent. For example, for N = 3, it is easy to find 2 (τ )E 6 (3τ ). (B.9) The rings of modular forms for Γ 1 (N ) usually have more generators. In the case of N = 2, the two rings are isomorphic. Luckily, for almost all numerators of the modular ansatz in the current work, we only need to use the Γ 0 (N ) generators. Only in the case of n = 1, so(8) (3) , we utilize Γ 1 (3). The ring of Γ 1 (3) has four generators: E    For N = 2, 3, 4, ∆ 2N (τ ) are also cusp forms of Γ 0 (N ), they take the form from eta functions or the modular generators as 2 ) 2 , (B.14) ∆ 6 (τ ) = η(3τ ) 18 η(τ ) 6 = 1 2 4 · 3 6 7(E 2 ) 4 − 144(E (4) C More on su(2r + 1) (2) theories In Section 4.3.3 we have discussed the Z 2 twist of 6d (1, 0) su(2r + 1) + 2(2r + 1)F theories where we choose the twisted matter content as (2r + 1)(F 0 + F 1/2 ). Here we choose a different assignment of the KK-charges of the twisted matter content as (2r + 1)(F 1/4 + F 3/4 ). We notice this choice results in some quite interesting twisted elliptic genera, thus we record our results here. This choice also makes the tensor parameter has integral B field. With this matter content, the circle reduction gives 5d N = 1 pure sp(r) gauge theories. Interestingly, we find there exist two possible solutions for the twisted elliptic blowup equations by choosing different characteristics a. The two solutions have circle reduction as 5d pure sp(r) 0 and sp(r) π theories respectively. Since the matter content is still invariant under the KK-charge shift by 1/2, we can expect some spectral flow symmetry. Most interestingly, we find the two twisted elliptic genera are dual to each other under spectral flow transformation! Besides, both twisted elliptic genera allow perfect modular ansatz. We have fixed the modular ansatz for both elliptic genera for r = 1, 2, 3 against the results from blowup equations and find perfect agreements. We summarize the relevant data of the modular ansatz in Table 29. In the following we show some detailed results for r = 1, 2.
n = 2, su(3) (2) With twisted matter content 3(F 1/4 + F 3/4 ), we find there are two possible low energy gauge groups sp(1) 0 or sp(1) π . For each case, we solve the twisted one-string elliptic genus from twisted unity elliptic blowup equations to q 4 order, and collect the Fourier coefficients in (q, v) expansion in Tables 30 and 31. For θ = 0 in Table 30, we recognize that the circle reduction of the twisted R-R sector colored orange gives exactly the one sp(1) 0 instanton Hilbert series, while the circle reduction of the twisted NS-R sector colored red gives exactly the one sp(1) π instanton Hilbert series. For θ = π in Table 31, it is exactly the opposite. It is interesting to see that the two elliptic genera are dual to each other under spectral flow!     (3) (2) + 3(F 1/4 + F 3/4 ) theory with θ = π. n = 2, su(5) (2) With twisted matter content 5(F 1/4 + F 3/4 ), we find there are two possible low energy gauge groups sp(2) 0 or sp(2) π . For each case, we solve the twisted one-string elliptic genus from twisted unity elliptic blowup equations to q 4 order, and collect the Fourier coefficients in (q, v) expansion in Tables 32 and 33. For θ = 0 in Table 32, we recognize that the circle reduction of the twisted R-R sector colored orange gives exactly the one sp(2) 0 instanton Hilbert series, while the circle reduction of the twisted NS-R sector colored red gives exactly the one sp(2) π instanton Hilbert series. For θ = π in Table 33, the situation is exactly the opposite. Again we observe that the two elliptic genera are dual to each other under spectral flow.

D Cases with unpaired matter content
We have focused on the twisted compactification of 6d (1, 0) SCFTs with paired matter content in the main context. The unpaired cases are trickier and have been discussed in [60] including the Calabi-Yau geometries and 5d low energy limits. The twist in this situation always involves zero mass of some hypermulitplet, thus there should exist no unity elliptic blowup equation or recursion formula for the twisted elliptic genera. However, we notice that sometimes it is possible to pretend the hyper has a free mass for blowup equations and then turn the mass off after solving the twisted elliptic genera. We find that for some twisted theories, this procedure allows consistent solutions of twisted elliptic genera. Remarkably, the solutions have perfect modular ansatz, spectral flow symmetry and required behavior in the (q, v) expansion. It is intriguing to consider whether the solutions are indeed physical. We give one example in the following. Consider the Z 2 twist of E 6 + F theory with n = 5. It was determined in [60] that the 5d low energy limit should be a pure F 4 theory. In other words, the twisted matter context should beR = 1 0 + 26 1/2 . Let us pretend the fundamental hyper 26 1/2 ofG = F 4 has a free mass m. This mass can have a shift in blowup equations such that there exist unity twisted elliptic blowup equations. Then from the recursion formula (3.30), we compute the twisted one-string elliptic genus to q order 5. Let us denote (D.1) We obtain the coefficients b ij in Table 34. We recognize the leading order of R-R elliptic genus colored orange gives exactly the one-instanton partition function of 5d pure F 4 theory, while the leading order of NS-R elliptic genus colored red gives exactly the one-instanton partition function of 5d F 4 + F theory. Interestingly, we find that even for twisted matter contentR = 26 0 + 1 1/2 , elliptic blowup equations still allow perfectly reasonable solution as long as we pretend the hyper 6 theory with matter 26 0 + 1 1/2 . has free mass. From the recursion formula (3.30), we also compute the twisted one-string elliptic genus of this case to q order 5. Let us denote We obtain the coefficients b ij in Table 35. We recognize the leading order of R-R elliptic genus colored orange gives the one-instanton partition function of 5d F 4 + F theory, while the leading order of NS-R elliptic genus colored red gives the one-instanton partition function of 5d pure F 4 theory. In fact, we find the twisted elliptic genera of the two cases are exactly spectral dual to each other. We also compute the twisted elliptic genera for both matter contents with the mass parameter turned on to q order 5 and find the spectral flow relation still holds perfectly. Moreover, we determine the modular ansatz for both cases and find complete consistency with the results from the recursion formula (3.27). We have summarized the relevant data of the two modular ansatz in Table 29.