I have forgotten
my Password

Or login with:

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

Padovan Numbers List

Calculates the Padovan numbers of orders 0 through \e n.
Controller: CodeCogs

Interface

C++

Padovan Numbers List

 
std::vector<int>padovan_numbers_listintn )
This function generates an array of Padovan numbers of orders 0 through n. The Padovan sequence is defined by the following recurrent formula:

with initial values

Example 1

#include <codecogs/maths/combinatorics/sequences/padovan_numbers_list.h>
#include <iostream>
int main() {
  std::vector<int> result = Maths::Combinatorics::Sequences::padovan_numbers_list(11);
  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;
}
Output:
Number of values: 11
1  1  1  2  2  3  4  5  7  9  12

References

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

Returns

the Padovan numbers of order 0 through n

Authors

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.