Lucas Numbers
Generate the Lucas number sequence (2, 1, 3, 4, 7, 11, 18...) up to any count
Pick a count and get the Lucas sequence out to that index — 2, 1, 3, 4, 7, 11, 18 and on. BigInt keeps every digit exact even past index 100, where regular JavaScript numbers start rounding off. And everything runs in your browser. Nothing gets uploaded.
Frequently Asked Questions
What are Lucas numbers?
Lucas numbers are an integer sequence similar to the Fibonacci sequence. They start with 2 and 1, and each subsequent number is the sum of the two preceding ones: 2, 1, 3, 4, 7, 11, 18, 29, 47, 76, and so on. They are named after the French mathematician Edouard Lucas.
How do Lucas numbers differ from Fibonacci numbers?
The only difference is the starting values. Fibonacci starts with 0 and 1, while Lucas starts with 2 and 1. Both sequences follow the same recurrence relation L(n) = L(n-1) + L(n-2). The ratio of consecutive terms in both sequences converges to the golden ratio (phi).
How many Lucas numbers can I generate?
You can generate up to 500 Lucas numbers. Since Lucas numbers grow exponentially, large values are computed using BigInt arithmetic for perfect precision regardless of how many digits the numbers contain.
What are Lucas numbers used for?
Lucas numbers appear in many areas of mathematics including primality testing (the Lucas-Lehmer test), combinatorics, and number theory. They also share interesting relationships with Fibonacci numbers, such as L(n) = F(n-1) + F(n+1).
Is any data sent to a server?
No. All calculations happen entirely in your browser using JavaScript. No data is uploaded, stored, or processed on any server. Your input never leaves your device.