I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
get GPL
this unit 0.25
sub units 0.00

involution numbers list

Calculates the numbers of involutions of 0 through \e n objects.
Controller: CodeCogs



Involution Numbers List

std::vector<int>involution_numbers_listintn )
This function calculates the number of involutions for 0 through n objects, using the following recurrent sequence:

An involution is a permutation consisting only of fixed points and pairwise transpositions. It can be proven that to every involution there is a unique corresponding inverse.

Example 1

#include <codecogs/maths/combinatorics/sequences/involution_numbers_list.h>
#include <iostream>
int main() {
  std::vector<int> result = Maths::Combinatorics::Sequences::involution_numbers_list(10);
  std::cout << "Number of values: " << result.size() << std::endl;
  for (int i = 0; i < result.size(); i++)
    std::cout << result[i] << "  ";
  std::cout << std::endl;
  return 0;
Number of values: 11
1  1  2  4  10  26  76  232  764  2620  9496


SUBSET, a C++ library of combinatorial routines, http://www.csit.fsu.edu/~burkardt/cpp_src/subset/subset.html


the involution numbers of order 0 to n


Lucian Bentea (August 2005)
Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.