Skip to content

Commit d79261e

Browse files
committed
Refactor eulerian_polynomial to use n <= 1
1 parent 3009d25 commit d79261e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/sage/combinat/combinat.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,7 @@ def eulerian_polynomial(n, algorithm='derivative'):
660660
R = PolynomialRing(ZZ, 't')
661661
if n < 0:
662662
return R.zero()
663-
if n == 0:
664-
return R.one()
665-
if n == 1:
663+
if n <= 1:
666664
return R.one()
667665
t = R.gen()
668666
if algorithm == 'derivative':

0 commit comments

Comments
 (0)