From 0acfb8e5f1579b10de3b6ae2e87985439bf2aa15 Mon Sep 17 00:00:00 2001 From: Ashton Bradley Date: Mon, 15 Nov 2021 14:10:05 +1300 Subject: [PATCH] narana and prevprod tweaks --- src/numbers.jl | 2 +- src/partitions.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/numbers.jl b/src/numbers.jl index 4465c77..4039f9f 100644 --- a/src/numbers.jl +++ b/src/numbers.jl @@ -68,7 +68,7 @@ end """ narayana(n,k) -Compute the Narayana number `N(n,k)`` given by ``\\frac{1}{n}\\binom{n}{k}\\binom{n}{k-1}`` +Compute the Narayana number `N(n,k)` given by ``\\frac{1}{n}\\binom{n}{k}\\binom{n}{k-1}`` Wikipedia : https://en.wikipedia.org/wiki/Narayana_number """ function narayana(bn::Integer,bk::Integer) diff --git a/src/partitions.jl b/src/partitions.jl index 9ba2969..305e23b 100644 --- a/src/partitions.jl +++ b/src/partitions.jl @@ -399,9 +399,9 @@ integers ``p_1``, ``p_2``, etc. For integers ``i_1``, ``i_2``, ``i_3``, this is equivalent to finding the largest ``x`` such that -```math -i_1^n_1 i_2^n_2 i_3^n_3 \\leq x -``` + +``i_1^{n_1} i_2^{n_2} i_3^{n_3} \\leq x`` + for integers ``n_1``, ``n_2``, ``n_3``. """ function prevprod(a::Vector{Int}, x)