The Lucas Sequence

The following was copied from the Wikipedia. "The Lucas numbers are an integer sequence named after the mathematician Francois Edouard Anatole Lucas (1842-1891), who studied both that sequence and the closely related Fibonacci numbers (both are Lucas sequences). The ratio between two consecutive Lucas numbers converges to the golden ratio."

   L(0) = 2; L(1) = 1
   L(n) = L(n - 1) + L(n - 2)

   where n is an integer such that n > 1
        2,        1,        3,        4,        7,       11,       18,
       29,       47,       76,      123,      199,      322,      521,
      843,     1364,     2207,     3571,     5778,     9349,    15127,
    24476,    39603,    64079,   103682,   167761,   271443,   439204,
   710647,  .......,

This collection was created when the Lucas numbers 1-199 had nBABs.

OEIS.org::id:A000032

MathBabbler took C++ code that he had written for the Padovan sequence and used it to create a program that prints the first few numbers of the Lucas sequence. The program, which is also a function, takes a number as input and determines if the number is in the Lucas sequence.

GDT::Math::MBNA::Lucas Sequence C++ source code


Creator: Gerald Thurman [gthurman@gmail.com]
Created: 19 December 2009
+ added 322 on 19 December 2009
+ added 521 on 27 June 2018
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 United States License.