Skip to content

Commit 8bb63d7

Browse files
yyyyx4GiacomoPope
andauthored
reviewer suggestion
Co-authored-by: Giacomo Pope <[email protected]>
1 parent 237223f commit 8bb63d7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/sage/combinat/q_analogues.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,17 +1046,14 @@ def number_of_irreducible_polynomials(n, q=None, m=1):
10461046
from sage.functions.other import binomial
10471047
from sage.combinat.partition import Partitions
10481048

1049-
def monic_reducible(irreducible, d):
1049+
def monic_reducible(irreducible, d):
10501050
"""
10511051
Compute the number of monic reducible polynomials of degree `d`
10521052
given the numbers of irreducible polynomials up to degree `d-1`.
10531053
"""
10541054
res = 0
10551055
for p in Partitions(d+1, max_part=d):
1056-
tmp = 1
1057-
for r, t in zip(irreducible, p.to_exp(d)):
1058-
tmp *= binomial(r+t-1, t)
1059-
res += tmp
1056+
res += prod( binomial(r+t-1,t) for r, t in zip(irreducible, p.to_exp(d)) )
10601057
return res
10611058

10621059
r = []

0 commit comments

Comments
 (0)