Perrin Number Calculator
Find the Perrin number at any index from the Padovan rule with seeds 3, 0 and 2, with growth shown.
What it does
The Perrin numbers follow the same rule as the Padovan sequence, adding the terms two and three places back, but they start from 3, 0 and 2. The early values are 3, 0, 2, 3, 2, 5, 5, 7, 10 and 12. The change of seeds gives the same growth constant but a different set of integers.
The sequence is named after Raoul Perrin, who described it in 1899. It is best known for a striking divisibility property: if p is prime, then p divides the Perrin number at index p. That makes the sequence useful as a quick compositeness test, though not a definitive one.
A composite number that also divides its own Perrin term is called a Perrin pseudoprime. The smallest one is large enough that the test looks perfect for small inputs, which is why the sequence is a popular example in discussions of probable primality.
This page computes a single term by walking forward from the three seeds with exact integer arithmetic, and shows the previous term and ratio alongside it. It does not perform the divisibility test itself.
The index limit is 200, which produces values of modest size because growth is governed by the plastic number near 1.325.
How to use
- Enter an index n from 0 to 200.
- Read the Perrin term in the main result box.
- Check the previous term and growth beside it.
- The default index 10 reproduces the worked example.
- Try index 11 to confirm the value 22.
- Compare with the Padovan page to see how seeds change the sequence.
Formula
- n
- The index in the Perrin sequence.
- P(n)
- The Perrin number at that index.
- P(n - 2), P(n - 3)
- The two earlier terms added to form the next one.
The characteristic equation is the same as for Padovan, x cubed minus x minus one, so the growth ratio still tends to the plastic number. The seeds are the only difference. The divisibility property concerns the index and the term value, not the ratio reported here.
Worked example
Example: index 10
The page opens with n = 10.
- Start from P(0) = 3, P(1) = 0 and P(2) = 2.
- Compute P(3) = P(1) + P(0) = 0 + 3 = 3.
- Compute P(4) = P(2) + P(1) = 2 + 0 = 2.
- Compute P(5) = P(3) + P(2) = 3 + 2 = 5.
- Continue with P(6) = 5, P(7) = 7, P(8) = 10 and P(9) = 12.
- Compute P(10) = P(8) + P(7) = 10 + 7 = 17.
- The tool reports 17, previous term 12, and growth 1.42x.
Reference table
| n | P(n) | Previous | Growth |
|---|---|---|---|
| 0 | 3 | n/a | n/a |
| 2 | 2 | 0 | n/a |
| 5 | 5 | 2 | 2.50x |
| 8 | 10 | 7 | 1.43x |
| 10 | 17 | 12 | 1.42x |
| 11 | 22 | 17 | 1.29x |
Limits
- Indices above 200 are rejected.
- The tool computes a term, it does not test divisibility or primality.
- The growth ratio is rounded to two decimals.
- The seeds 3, 0, 2 are fixed for this page.
Common mistakes
- Using the Padovan seeds 1, 0, 0 with this name.
- Adding the previous two terms instead of skipping one.
- Treating the divisibility property as proof of primality in both directions.
- Assuming the growth ratio is constant from the start.
- Forgetting that P(1) is zero.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is P(10)?
P(10) = P(8) + P(7) = 10 + 7 = 17.
What is P(11)?
P(11) = P(9) + P(8) = 12 + 10 = 22.
What are the first three terms?
They are 3, 0 and 2 at indices 0, 1 and 2.
Questions
Who described the sequence?
Raoul Perrin wrote about it in 1899, though related values were studied earlier.
What is a Perrin pseudoprime?
A composite index that divides its own Perrin term, even though only primes are expected to.
How does this differ from Padovan?
Same recurrence, different starting values: 3, 0, 2 here and 1, 0, 0 there.
What is the growth constant?
The plastic number, about 1.3247, just as for Padovan.
Are the values exact?
Yes. Only integer addition is used.
What is the largest index?
Two hundred.