Thousands of tools! Check out Online Tools – I have now added thousands of tools.

I often have to generate random Lucas numbers so I created this simple online utility that does it for me. It lets you generate however many random Lucas numbers you need from the given range. It works in the browser and is powered by alien technology from the future.

## Random Lucas Number Generator Options

Random Lucas Range
Count and Separator
Output Base

## Random Lucas Number Generator Examples (click to try!)

Twelve Random Lucas Numbers
In this example, we generate 12 random Lucas numbers from the range of [1, 500], and display them separated by the comma symbol.
`4, 3, 2, 1, 7, 123, 18, 29, 11, 47, 199, 76`
Starting value.
Ending value.
How many values to generate?
Separate random Lucas numbers with this character.
Decimal Base
Large Random Lucas Numbers
This example sets the start of the range equal to a billion, the end of the range equal to a quadrillion, and sequence length to 25 elements. Thus, in the output, we get 25 random Lucas numbers all anywhere from 10 to 15 digits in length.
```4106118243
192900153618
1568397607
1322157322203
17393796001
10749957122
505019158607
38388099893011
100501350283429
312119004989
119218851371
73681302247
62113250390418
3461452808002
23725150497407
14662949395604
2139295485799
425730551631123
2537720636
688846502588399
6643838879
45537549124
5600748293801
28143753123
162614600673847```
Starting value.
Ending value.
How many values to generate?
Separate random Lucas numbers with this character.
Decimal Base
Random Lucas Numbers in Binary Base
This example generates random Lucas numbers in the base two. We're asking the utility to generate 50 values in the range from 1 to 1000 but there are only 15 Lucas numbers in this range. The utility knows this and generates all 15 values in an arbitrary order and also shows a warning label about the lack of values.
`11101 1 1001100 1111011 101111 10010 1101001011 10 100 111 101000010 1000001001 11 1011 11000111`
Starting value.
Ending value.
How many values to generate?
Separate random Lucas numbers with this character.
Binary Base

## How Does This Random Lucas Number Generator Work?

This random Lucas series generator works entirely in your browser and is written in JavaScript. First, it checks if the options `start` and `end` (start and end of the random Lucas numbers range) are valid and generates an array `lucasSequence` (or `ls` for short) that contains all Lucas numbers in this range. To pick a random Lucas number from `ls` array, it generates a random index `i` by using the formula `floor(rand() * ls.length)` and selects the `i`-th number by calling `ls[i]`. It then uses the `push()` function to add this number to the `randomLucas` array that contains all randomly selected Lucas numbers. To prevent the repetition of Lucas numbers, it removes the just selected `ls[i]` from the `ls` array by using the `splice(i, 1)` function. It repeats this picking process until `randomLucas` array has as many numbers as you've specified in the `count` option (length of the random Lucas sequence), or until the `ls` array becomes empty. Finally, it combines all the elements of the `randomLucas` array into a string and puts the `separator` value between them.

### Created by Browserling

This random lucas number generator was created by me and my team at Browserling. Behind the scenes, it's actually powered by our web developer tools that are used by millions of people every month. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!

Secret message: If you love my tools, then I love you, too! Use coupon code TOOLLING to get a discount at my company.