Opened 9 years ago
Closed 9 years ago
#13798 closed enhancement (fixed)
q-Bernoulli numbers of Carlitz
Reported by: | chapoton | Owned by: | sage-combinat |
---|---|---|---|
Priority: | minor | Milestone: | sage-5.8 |
Component: | combinatorics | Keywords: | bernoulli |
Cc: | Merged in: | sage-5.8.beta3 | |
Authors: | Frédéric Chapoton | Reviewers: | Francis Clarke |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Leonard Carlitz has introduced q-analogues of Bernoulli numbers in
- Carlitz, L: q-Bernoulli numbers and polynomials. Duke Math J. 15, 987–1000 (1948)
- Carlitz, L: q-Bernoulli and Eulerian numbers. Trans Am Soc. 76, 332–350 (1954)
These q-Bernoulli numbers are fractions in q, that give the usual Bernoulli numbers when q=1.
A patch to compute them is proposed below. Maybe someone could make it more efficient ?
Attachments (1)
Change History (13)
comment:1 Changed 9 years ago by
- Description modified (diff)
comment:2 Changed 9 years ago by
- Status changed from new to needs_review
comment:3 Changed 9 years ago by
- Reviewers set to Francis Clarke
- Status changed from needs_review to needs_work
comment:4 Changed 9 years ago by
I have made some corrections and enhancements.
I would prefer not to add the optional choice of the value of q. Indeed, in the computation, one has to divide by q^n -1
for many n. One would therefore had to ensure that q is not a root of unity. I prefer to have a procedure that clearly work with an indeterminate q.
Note that my principal aim is speed.
comment:5 Changed 9 years ago by
- Status changed from needs_work to needs_review
comment:6 Changed 9 years ago by
Here is a new patch:
- I have added the possibility to evaluate at another point, like for q_binomials.
- I have enhanced the references, using #14011.
Please review !
comment:7 Changed 9 years ago by
- Status changed from needs_review to needs_work
Just a few trivia:
Bernoulli number `B_n`
needs to be
Bernoulli number `B_m`
I think "rational function of" would be better than "fraction in", and then "function is" rather than "fraction is".
For compatibility with gaussian_binomial
it would be preferable if the optional argument was called q
rather than p
.
Changed 9 years ago by
comment:8 Changed 9 years ago by
- Status changed from needs_work to needs_review
Here is a corrected patch.
I have not changed the name of the optional argument from p to q, because the optional parameter of q_binomial is also called p.
comment:9 Changed 9 years ago by
- Status changed from needs_review to positive_review
Yes, it's fine now.
I wasn't aware of
q_binomial
and the other functions hidden away incombinat/q_analogues.py
. Shouldn't they be more widely available? In particulargaussian_binomial
ought to use theq_binomial
code because it's significantly faster. I still preferq
top
though!
comment:10 Changed 9 years ago by
Thanks for the review.
I was not aware of the gaussian_binomial function.
comment:11 Changed 9 years ago by
comment:12 Changed 9 years ago by
- Merged in set to sage-5.8.beta3
- Resolution set to fixed
- Status changed from positive_review to closed
I believe the code implements Carlitz's definition accurately. It's difficult to see how it could easily be speeded up.
Just a few improvements are needed, I think.
int
, which is compatible withgaussian_binomial
, letting users write things like and gives a less confusing error message forq_bernoulli
even more compatible withgaussian_binomial
it would be worth having a second argument, defaulting to a the polynomial generatorq
. [Actuallyq_binomial(4, 2, 1)
raises aZeroDivisionError
at present. I'll raise a ticket for this.]