FUNCTION
ASM_Number
Returns the number of alternating sign matrices of the given order.
Interface
#include <codecogs/maths/combinatorics/sequences/asm_number.h>
using namespace Maths::Combinatorics::Sequences;
A direct formula for calculating the number of alternating sign matrices of order n is:
(1)
References
SUBSET, a C++ library of combinatorial routines, http://www.csit.fsu.edu/~burkardt/cpp_src/subset/subset.html
Example 1
#include <codecogs/maths/combinatorics/sequences/asm_number.h>
#include <iostream>
int main()
{
for (int i = 0; i < 10; i++)
std::cout << i << " " << Maths::Combinatorics::Sequences::asm_number(i) << std::endl;
return 0;
}Output:
0 1
1 1
2 2
3 7
4 42
5 429
6 7436
7 218348
8 10850216
9 188958604Parameters
n
the order of the matrices
Returns
the number of alternating matrices of order n
Interactive Calculator
n
Result
Computing…
Set a range above first to export a graph.
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.