Skip to content

QPochhammer ​

The q-Pochhammer symbol (a;q)n=∏k=0n−1(1−aqk)(a; q)_n = \prod_{k=0}^{n-1} (1 - a q^k), for a nonnegative integer nn or n=∞n = \infty. Provided by @enumeratio/analytic.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageQPochhammer!
QPochhammer(a, q, n)the q-Pochhammer symbol (a;q)n(a; q)_n.
SageMathenumeratio_q_pochhammer(a, q, n)
Typed signatures
TypePackageApplies
(complex, complex, infinity | integer) -> numberanalyticalways

Domain: Special functions

Details
  • Finite n≥0n \ge 0 builds the product from exact boxed arithmetic — an exact rational aa or qq stays exact, and n=0n = 0 gives the empty product, 1, even for symbolic aa and qq.
  • n=∞n = \infty is Euler's infinite product, numeric-only and only where it converges (∣q∣<1|q| < 1); it stays symbolic for exact operands (use N()) and for ∣q∣≥1|q| \ge 1.
  • Negative or symbolic nn is not implemented and stays symbolic — Wolfram's extension to negative nn via (a;q)−n=1/∏k=1n(1−aq−k)(a;q)_{-n} = 1/\prod_{k=1}^n(1 - a q^{-k}) is not carried here.

Plot

Examples

6 more kept as data, checked against the oracles
Basic #

(1−2)(1−6)(1−18)=−85(1-2)(1-6)(1-18) = -85

live ↗
InQPochhammer(2,3,3)\mathrm{QPochhammer}(2, 3, 3)Out−85-85

Exact rational arithmetic, no N() needed

live ↗
InQPochhammer(12,12,3)\mathrm{QPochhammer}(\frac{1}{2}, \frac{1}{2}, 3)Out2164\frac{21}{64}
Scope #

The infinite product, Euler's function at q=12q = \tfrac12

live ↗
InQPochhammer(0.5,0.5,∞)\mathrm{QPochhammer}(0.5, 0.5, ∞)Out0.288 788 095 086 602 40.288\,788\,095\,086\,602\,4

(3;5)9(3;5)_9 as an exact integer, a product of nine factors 1−3⋅5k1-3\cdot5^k

live ↗
InQPochhammer(3,5,9)\mathrm{QPochhammer}(3, 5, 9)Out−175 258 163 137 268 414 822 846 915 072-175\,258\,163\,137\,268\,414\,822\,846\,915\,072

With one factor, (a;2)1=1−a(a;2)_1 = 1-a

live ↗
InFunctionExpand(QPochhammer(a,2,1))\mathrm{FunctionExpand}(\mathrm{QPochhammer}(a, 2, 1))Out1−a1-a

Complex base and ratio give an exact complex rational

live ↗
InQPochhammer(12+12i,12−12i,10)\mathrm{QPochhammer}(\frac{1}{2}+\frac{1}{2}i, \frac{1}{2}-\frac{1}{2}i, 10)Out95 264 271268 435 456−25 488 603268 435 456i\frac{95\,264\,271}{268\,435\,456}-\frac{25\,488\,603}{268\,435\,456}i

A matrix function with exact entries at eigenvalues −1-1 and 5

live ↗
InMatrixFunction(_1⁡↦QPochhammer(3,_1⁡,5),[[−1,0],[0,5]])\mathrm{MatrixFunction}(\operatorname{\_1}↦\mathrm{QPochhammer}(3, \operatorname{\_1}, 5), \bigl\lbrack\bigl\lbrack-1, 0\bigr\rbrack, \bigl\lbrack0, 5\bigr\rbrack\bigr\rbrack)Out[[−128,0],[0,−1 452 215 072]]\bigl\lbrack\bigl\lbrack-128, 0\bigr\rbrack, \bigl\lbrack0, -1\,452\,215\,072\bigr\rbrack\bigr\rbrack
live ↗
InFunctionExpand(QPochhammer(2,q,5))\mathrm{FunctionExpand}(\mathrm{QPochhammer}(2, q, 5))Out(1−2q4)(1−2q3)(1−2q2)(2q−1)(1-2q^4)(1-2q^3)(1-2q^2)(2q-1)
live ↗
InNormal⁡(Series⁡(QPochhammer(n,q,x),q,0,3))\operatorname{Normal}(\operatorname{Series}(\mathrm{QPochhammer}(n, q, x), q, 0, 3))Out16QPochhammer(0,3,0)(n,0,x)q3+12QPochhammer(0,2,0)(n,0,x)q2+qQPochhammer(0,1,0)(n,0,x)+QPochhammer(n,0,x)\frac{1}{6}\mathrm{QPochhammer}^{(0, 3, 0)}(n, 0, x)q^3+\frac{1}{2}\mathrm{QPochhammer}^{(0, 2, 0)}(n, 0, x)q^2+q\mathrm{QPochhammer}^{(0, 1, 0)}(n, 0, x)+\mathrm{QPochhammer}(n, 0, x)
Properties #

The empty product

live ↗
InQPochhammer(a,q,0)\mathrm{QPochhammer}(a, q, 0)Out11

Zero factors give the empty product 1

live ↗
InQPochhammer(0,0,0)\mathrm{QPochhammer}(0, 0, 0)Out11

Known value · Wolfram MathematicalFunctionData, QPochhammer

With a=q=0a=q=0 and one factor the value is still 1

live ↗
InQPochhammer(0,0,1)\mathrm{QPochhammer}(0, 0, 1)Out11

Known value · Wolfram MathematicalFunctionData, QPochhammer

About
Examples18
Checked againstWolfram Language 17 agree1 differSageMath 11 agree1 unevaluated3 error
CrosswalkWolfram LanguageSageMath

Implementation

primitive · kernela kernel — an algorithm over mutable state that would not be readable as a tree

nativeenginetypescriptpackages/symbols/analysis/analytic/src/q-series.ts

finite n: exact boxed Multiply/Subtract/Power, evaluated in place. Infinite n: a capped product until |q^k| underflows.

mappedexternalwolfram / mpmathpackages/oracle/src/mappings.ts

QPochhammer[a, q, n]; mpmath.qp(a, q, n).

mappedsagepackages/oracle/src/mappings.ts

See also: QFactorial, QBinomial