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

I often have to generate Lucas prime numbers so I created this simple online utility that does it for me. It lets you calculate however many Lucas primes or their indexes as you need, starting from any position. It works in the browser and is powered by alien technology from the future.

Lucas Primes Generator Options

Primes or Indexes
Generate a list of Lucas prime numbers (Ln).
Generate a list of indexes (n) of Lucas prime numbers (Ln).
Start, Count and Separator
Primes or Indexes Base

Lucas Primes Generator Examples (click to try!)

First 14 Lucas Primes
In this example, we generate the first fourteen Lucas prime numbers and display each one on a new line.
Print Lucas Primes
Starting position.
Generate this many Lucas prime numbers or indexes.
Separate Lucas primes or indexes with this character.
Decimal Base
First 40 Lucas Indexes
In this example, we generate a list of forty indexes (n) whose Lucas numbers (Ln) are prime numbers.
0, 2, 4, 5, 7, 8, 11, 13, 16, 17, 19, 31, 37, 41, 47, 53, 61, 71, 79, 113, 313, 353, 503, 613, 617, 863, 1097, 1361, 4787, 4793, 5851, 7741, 8467, 10691, 12251, 13963, 14449, 19469, 35449, 36779
Print Lucas Indexes
Starting position.
Generate this many Lucas prime numbers or indexes.
Separate Lucas primes or indexes with this character.
Decimal Base
Lucas Primes in Octal Base
This example sets the starting position to 30 and generates only one Lucas prime number L30 in the octal base. The length of this number is 1110 digits in base-8 but in base-10 its length is 1002 digits.
Print Lucas Primes
Starting position.
Generate this many Lucas prime numbers or indexes.
Separate Lucas primes or indexes with this character.
Octal Base

How Does This Lucas Primes Generator Work?

This Lucas prime number generator works entirely in your browser and is written in JavaScript. There are infinitely many prime numbers but only 64 known Lucas prime numbers. As Lucas numbers that are also prime numbers are so rare, their values get extremely large. Just the 50th Lucas prime consists of almost forty thousand digits. Therefore, this utility uses a previously calculated lookup table of the first 40 values and stores them in the lucas-primes.js script. It uses the lucasPrimes array of unnamed objects with keys prime and index as the data structure to hold the Lucas primes and corresponding Lucas indexes. It then calls the slice() function with start and start + count arguments to get count values starting from the start position (both specified in options) of lucasPrimes array. Then, depending on which option is selected (generate Lucas primes or Lucas indexes), it accesses the prime or index value and changes its base to the one that's specified in options. After all this, it join()s the values together with the separator as an argument.

Created by Browserling

This lucas primes 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.