-2
$\begingroup$

if the recurrence sequence is defined by the following foormula, $d_{n + 3} = 3d_{n + 2} - d_{n + 1} - 2d_n$ where $d_1 = 1, d_2 = 3$ and $ d_3 = 7$, this produce the following complex sequence $$1, 3, 7, 16, 35, 75, 158, 329, 679, 1392, ...$$.

if this sequence is evaluated over finite field, i mean modulo some interger, $p$ $$(d_{n + 3} = 3d_{n + 2} - d_{n + 1} - 2d_n) \text{mod}\,p$$ It follows that, if $p$ is prime number, the last three term if evaluated up to $n = p + 2$, last three terms i mean $d_{p}, d_{p + 1}$ and $d_{p + 2}$ fall in one of the following ending sequence $\{...,1, 3, 7\}$ or $\{...,4, 7, 14\}$, if $p$ is smaller than these ending patterns, then modulo by $p$. the only exception for prime numbers less than $7$

i have tested all numbers up to $100,000$, no pseudo prime exist

Prior Studied Sequences

i studied Lucas numbers for existence of pattern like this, but there existed many pseudo prime below $10,000$ e.g $377$. then i studied recussive sequence defined by the following formula $d_{n+3} = d_{n + 2} + 2d_{n + 1} - d_n$. in this sequence pseudo prime exist above $10^6$, may be this sequence can pull up this boundary

Questions

  • is there any pseudo prime above tested range of this sequence
  • can anyone explain to me further why this patterns appear to prime only, if mo pseudoprime pass this test

UPDATES ONE DAY AFTER POST

This update i made after reviewing users comments and answers, thanks to @ Alekseyev for discovering pseudo primes and all other contributions

Facts About Pseudo Primes Of This Recurence

  • all pseudo primes are divisible by primes. $p_1, p_2,..., p_n$, all of these primes are in the form of $10k + 1$. My limitation is computational power, i can not test big numbers
  • all prime factors of these pseudo primes have period of $p - 1$. prime numbers of the form $10k - 1$ also have periods of the form $p -1$. no counter example for other primes having this form of period. if any found?
  • if a composite number $n$ have all of its prime factors of this form, $p = 10k + 1$. the resulting period of $n$ get reduced by factor of $10$ and sometimes more than that. the gcd of resultant period $r$ and $n - 1$ is equal to $r$. this explain why $nth$ period occurs at $p - 1$ and the number get evaluated as prime number while not

New Update

as we go to the right of number line toward big numbers, things start to deviate from my expectation and all the statement above seem to be invalid, i have found one pseudo prime whose last digit is not $1$, $6368689$ and some prime factors of pseudo primes are not of form $10k + 1$, $16778881$

here is a list of all pseudo prime up to $20 \times 10^6$.

$219781,252601,399001,512461,722261,741751,852841,1024651,1193221,1533601,1690501,1735841,1857241,1909001, 2100901, 2165801, 2603381, 2704801, 2757241, 3568661, 4504501, 6368689, 6840001, 8341201, 8646121, 8719921, 9863461, 10386241, 10403641, 10837321, 12261061, 14609401, 14671801, 16778881$

$\endgroup$
6
  • 1
    $\begingroup$ $d_4=3d_3-d_2-2d_0$, but you haven't specified $d_0$, so there's no way you can compute $d_4$. $\endgroup$ Feb 2, 2018 at 1:49
  • 2
    $\begingroup$ Previous question was mathoverflow.net/questions/291835/… $\endgroup$ Feb 2, 2018 at 1:51
  • 2
    $\begingroup$ @GerryMyerson: Numbers suggest that it should be $d_{n+3}=3d_{n+2}-d_{n+1}-2d_n$. $\endgroup$ Feb 2, 2018 at 1:58
  • $\begingroup$ As you increase the degree of your recurrence, incidentally, it should be no surprise that pseudoprimes tend to become rarer. $\endgroup$ Feb 2, 2018 at 2:24
  • $\begingroup$ @GerryMyerson this is true i made a mistake $\endgroup$ Feb 2, 2018 at 6:55

1 Answer 1

4
$\begingroup$

The sequence of pseudoprimes here starts with: $$219781, 252601, 399001, 512461, 722261, 741751, 852841, 1024651, 1193221, 1533601, 1690501, 1735841, 1857241, 1909001, \dots$$

UPDATE. Efficient testing of a given positive integer $n$ can be done using the formula: $$ \begin{bmatrix} d_n\\ d_{n+1}\\ d_{n+2}\end{bmatrix} = \begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ -2& -1& 3 \end{bmatrix}^{~~n-1} \cdot \begin{bmatrix} 1\\ 3\\ 7\end{bmatrix},$$ where computations are performed modulo $n$ (in particular, using modular exponentiation of the matrix by squaring).

Here is my PARI/GP code for the test:

test(n) = my(t); t=([0, 1, 0; 0, 0, 1; -2, -1, 3]*Mod(1,n))^(n-1)*[1,3,7]~; t==[4,7,14]~ || t==[1,3,7]~;
$\endgroup$
5
  • $\begingroup$ i have ruled out all these pseudo primes, read my updates please $\endgroup$ Feb 2, 2018 at 7:01
  • 2
    $\begingroup$ I've read your updates, and have no idea why they rule out these pseudoprimes. But in any event, it's considered bad form to change a question just because you don't like the answer. $\endgroup$ Feb 2, 2018 at 7:48
  • $\begingroup$ no i havent changed the question but am trying to update it so that someone can contribute from that point. the question is the same brother $\endgroup$ Feb 2, 2018 at 8:50
  • $\begingroup$ and, is there any method to compute the nth term directy without recussion or loop? $\endgroup$ Feb 2, 2018 at 8:56
  • $\begingroup$ @EsdrasEEDansha: I've explained how this can be implemented efficiently in the update. $\endgroup$ Feb 2, 2018 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.