Jacobsthal-Lucas Number Calculator
Number Theory
- The Jacobsthal-Lucas numbers are j(n) = 2^n + (-1)^n. Substituting n = 10 gives the term below.
- 2^10 = 1,024 and (-1)^10 = 1, so j(10) = 1,025. The same value comes from the recurrence j(n) = j(n - 1) + 2j(n - 2).
- Term 10 of the Jacobsthal-Lucas numbers is 1,025. The term before it is 511 and the term after it is 2,047.
- The companion Jacobsthal number is J(n) = (2^n - (-1)^n) / 3 = 341 here, and the terms from j(0) to j(10) add to 2,048.
The Jacobsthal-Lucas numbers are the companion sequence to the Jacobsthal numbers, in the same way the Lucas numbers accompany Fibonacci. They begin 2, 1, 5, 7, 17, 31, 65, 127, 257, 511 and 1025, and they obey the same second-order recurrence as their plainer sibling: each term is the previous term plus twice the one before it.
What makes the companion special is its closed form: j(n) = 2^n + (-1)^n. The alternating correction term explains the sequence's rhythm - even-indexed terms sit one above a power of two, odd-indexed terms one below - and it lets the calculator produce any term directly, with no need to iterate the recurrence from the start.
Enter an index n and the calculator shows the term, its neighbours, the recurrence cross-check and the closed-form evaluation side by side. That double computation is deliberate: for companion sequences the fastest way to trust a value is to reach it by two independent routes and watch them agree.
Worked examples
Tenth term
(10)
| Jacobsthal-Lucas number j(n) | 1,025 |
| Previous term | 511 |
| Next term | 2,047 |
| Jacobsthal companion J(n) | 341 |
Seventh term
(7)
| Jacobsthal-Lucas number j(n) | 127 |
| Previous term | 65 |
| Next term | 257 |
| Jacobsthal companion J(n) | 43 |
Twelfth term
(12)
| Jacobsthal-Lucas number j(n) | 4,097 |
| Previous term | 2,047 |
| Next term | 8,191 |
| Jacobsthal companion J(n) | 1,365 |
The companion idea
Many famous sequences come in pairs. The Jacobsthal numbers J(n) count tilings and satisfy J(n) = J(n - 1) + 2J(n - 2) from 0, 1; the Jacobsthal-Lucas numbers j(n) satisfy the identical recurrence from different seeds, 2, 1. Same rule, different starting values, different sequence - the pairing mirrors Fibonacci and Lucas exactly.
Companions are more than a curiosity. Sums, differences and products of a pair interlock: j(n) = J(n - 1) + J(n + 1), and j(n) = J(n) + 2J(n - 1). The calculator's steps display the neighbour identity for the index you choose, so the relationship is checked numerically every time.
The closed form
j(n) = 2^n + (-1)^n. For even n the correction adds one: j(10) = 1024 + 1 = 1025. For odd n it subtracts one: j(7) = 128 - 1 = 127. The whole sequence is therefore powers of two, nudged by a single unit in alternating directions.
A closed form changes what questions are easy. Growth is transparent - the terms essentially double each step - and huge indices pose no problem: j(12) = 4097 is one substitution, where the recurrence would need every intermediate term. The price is that the form hides the tiling interpretations the recurrence carries.
One more pattern for the road: read the sequence modulo small numbers and cycles appear immediately, because the recurrence is linear. Modulo 3 the terms run 2, 1, 2, 1 with period 2 in the companion's case - the alternating closed form makes the periodicity transparent. Pisano-style period hunting is a standard first research exercise on sequences like this, and the companion's clean closed form makes its periods unusually easy to prove rather than merely observe.
The first terms
The sequence opens 2, 1, 5, 7, 17, 31, 65, 127, 257, 511, 1025. Two features stand out: the dip at n = 1, where the correction term overwhelms the small power of two, and the Mersenne-like run 31, 127 - values of the form 2^k - 1 appear whenever the index is odd.
Several terms are prime - 5, 7, 17, 31, 127 - and the odd-index terms 2^n - 1 inherit the primality behaviour of Mersenne numbers: an odd-index term can be prime only in restricted circumstances, which makes the family a small but genuine playground for prime hunting.
A worked example
Take n = 10. The closed form gives 2^10 + (-1)^10 = 1024 + 1 = 1025. The recurrence route must agree: j(9) + 2 x j(8) = 511 + 2 x 257 = 1025. The calculator walks both routes in its steps, then reports the neighbours 511 and 2047.
A second example shows the odd case: n = 7 gives 2^7 - 1 = 127, a Mersenne prime. Its neighbours are 65 and 257, and the identity j(7) = J(6) + J(8) is displayed as a third check.
Running totals
The sum of the first eleven terms, j(0) through j(10), is 2048 - exactly 2^11. That is no accident: pairing each 2^k + (-1)^k with its neighbours makes the corrections cancel in a telescoping sum, leaving a clean power of two.
Telescoping sums are the companion sequence's signature convenience. Where the plain Jacobsthal sums involve fractions and floors, the Lucas-type sums collapse - one more reason the pair is studied together rather than separately.
Where Jacobsthal-Lucas numbers show up
They arise in tiling counts alongside the Jacobsthal numbers, in the analysis of the recurrence x(n) = x(n - 1) + 2x(n - 2) wherever it models growth with a doubled memory term, and in closed-form exercises for linear recurrences with characteristic roots 2 and -1.
The characteristic equation is the deep reason for everything on this page: roots 2 and -1 produce exactly the basis 2^n and (-1)^n, and the two seed values choose the mixture. Change the seeds and you get the plain Jacobsthal numbers; the closed form on this page is the mixture for seeds 2 and 1.
Two identities worth knowing
The pair of Jacobsthal sequences multiplies beautifully: j(n) x J(n) = J(2n). At n = 10: 1025 x 341 = 349525, and J(20) = (2^20 - 1) / 3 = 349525. Identities like this are why companions are studied as a pair - products and sums land back inside the family, doubled indices and all.
A second identity rebuilds the companion from the plain sequence alone: j(n) = J(n) + 4 x J(n - 1). Check it at three indices: n = 5 gives 11 + 4 x 5 = 31; n = 7 gives 43 + 4 x 21 = 127; n = 10 gives 341 + 4 x 171 = 1025. The calculator's recurrence check is the same spirit in reverse - every route through the family must land on the same integer.
The characteristic equation
Everything on this page flows from one quadratic: x^2 = x + 2, with roots 2 and -1. Any sequence obeying the Jacobsthal recurrence is a mixture A x 2^n + B x (-1)^n; the seeds choose A and B. The plain Jacobsthal numbers take A = 1/3, B = -1/3; the companion takes A = B = 1, the cleanest mixture of all.
That is the deep reason the companion's closed form has no fractions: its seeds happen to be exactly the sum of the two basis sequences. It is also why the pair mirrors Fibonacci and Lucas so faithfully - the same construction with roots (1 +/- sqrt(5)) / 2 there, and roots 2 and -1 here.
Tilings counted by the pair
The plain Jacobsthal numbers count tilings: J(n) enumerates ways to tile a board with squares and dominoes under a colouring twist, and the companion counts the circular arrangements of the same pieces - bracelets rather than rows. That is the usual pattern for Lucas-type companions across all these families: linear arrangements for the plain sequence, cyclic arrangements for the companion, and the closed forms differ exactly by the sign mixture that cyclic symmetry forces.
Seen that way, the dip at j(1) = 1 stops being a curiosity: a circular arrangement of almost nothing has almost no freedom, and the companion sequence starts low before the doubling growth takes over. Combinatorics first, algebra second - the formula on this page is the shadow of a counting problem.
Common mistakes
The commonest slip is using the plain Jacobsthal closed form (2^n - (-1)^n) / 3 for the companion; at n = 10 that gives 341, the Jacobsthal number J(10), not 1025. The second slip is a sign error on odd indices, writing 2^n + 1 where 2^n - 1 belongs.
A third is an indexing slip: this calculator starts at j(0) = 2, so the term some tables list first (2, then 1, then 5) is index 0 here. Checking a value against its neighbours through the recurrence catches all three mistakes at once.
FAQs
What is a Jacobsthal-Lucas number?
The companion of the Jacobsthal numbers: j(n) = 2^n + (-1)^n, satisfying j(n) = j(n - 1) + 2j(n - 2) from seeds 2 and 1.
What is j(10)?
1025 - one more than 2^10, since the index is even.
What is j(12)?
4097.
How do Jacobsthal-Lucas and Jacobsthal numbers differ?
They share the recurrence but start from different seeds, 2, 1 versus 0, 1; their closed forms are 2^n + (-1)^n and (2^n - (-1)^n) / 3.
What do the terms j(0) to j(10) add to?
2048 - the alternating corrections cancel telescopically.
Are any Jacobsthal-Lucas numbers prime?
Yes - 5, 7, 17, 31 and 127 among the early terms; odd-index terms have the form 2^n - 1.
What recurrence do they satisfy?
j(n) = j(n - 1) + 2j(n - 2), the same as the Jacobsthal numbers.
Why the name Lucas?
By analogy with the Lucas numbers, the companion of the Fibonacci numbers - same recurrence, different seeds.
What is j(n) times J(n)?
J(2n) - at n = 10, 1025 x 341 = 349525 = J(20).
Why does the closed form have no fractions?
The companion's seeds 2 and 1 are exactly the sum of the basis sequences 2^n and (-1)^n, so the mixture coefficients are both 1.