1

This question is successor of Primality test for numbers of the form (11^p−1)/10

Here is what I observed:

For $(10^p-1)/9$ :

Let $N$ = $(10^p-1)/9$ when $p$ is a prime number $p > 3$.

Let the sequence $S_i=S_{i-1}^{10}-10 S_{i-1}^8+35 S_{i-1}^6-50 S_{i-1}^4+25 S_{i-1}^2-2$ with $S_0=123$. Then $N$ is prime if and only if $S_{p-1} \equiv S_{0}\pmod{N}$.

I choose $123$ because this is the $10_{th}$ Lucas number $L_{10}$.

For the sequence, I choose the Lucas' polynomial $L_{10}(x)$ and alternate $+$ and $-$ for each part as shown in the sequence. (I don't know if these polynomials have a name).

For the test I use PARI/GP.

For example with $p = 19$ I found with PARI/GP:

 Mod(123, 1111111111111111111)
 Mod(959728737261142095, 1111111111111111111)
 Mod(1087997224047968198, 1111111111111111111)
 Mod(1083348694997563282, 1111111111111111111)
 Mod(1039950736755546285, 1111111111111111111)
 Mod(182325812441571117, 1111111111111111111)
 Mod(579459289893901100, 1111111111111111111)
 Mod(1068377107457264504, 1111111111111111111)
 Mod(515160075503304980, 1111111111111111111)
 Mod(429948940599801490, 1111111111111111111)
 Mod(986618928768148932, 1111111111111111111)
 Mod(588443728549357779, 1111111111111111111)
 Mod(1031474122141075375, 1111111111111111111)
 Mod(567090245602400840, 1111111111111111111)
 Mod(76640950307142886, 1111111111111111111)
 Mod(924987104665055322, 1111111111111111111)
 Mod(374008108546502807, 1111111111111111111)
 Mod(143266707375326409, 1111111111111111111)
 Mod(123, 1111111111111111111)

And $1111111111111111111$ is indeed a prime number.

For $((10 \cdot 2^n)^p-1)/(10 \cdot 2^n-1)$ :

I tested some extensions with $(20^p-1)/19, (40^p-1)/39$ and $(80^p-1)/79$ and it seems the primality test works for example where $S_0=15127$, the $20_{th}$ Lucas number with the Lucas polynomial $L_{20}(x)$ still with $+$ and $-$ alternated.

Globally $L_{10 \cdot 2^n}$ for Lucas number and $L_{10 \cdot 2^n}(x)$ for Lucas polynomials with $+$ and $-$ alternated.

Is there a way to explain this? I try to prove it by myself but it's not easy. If you found a counterexample please tell me.

  • 1
    Interesingly, It seems the primality test works too with $(10^p+1)/11$ and the same seed $S_{0} = 123$ and the sequence $S_i=S_{i-1}^{10}-10 S_{i-1}^8+35 S_{i-1}^6-50 S_{i-1}^4+25 S_{i-1}^2-2$ – kijinSeija Dec 17 '21 at 17:27
  • Are you interested in a larger search range ? And did you check the known (probable) primes of this form ? – Peter Dec 18 '21 at 12:28
  • @Peter, Sure. I'm intersted about a large search range and I checked some probable primes with PARI/GP. I will check some higher probable primes too for $(10^p-1)/9$ and $(10^p+1)/11$ – kijinSeija Dec 18 '21 at 12:41
  • 1
    I think, we should not make too much simultaneously unless someone can show that the Lucas method can be generalized and solve all those questions. This would also explain that the test works surprisingly for utter different expressions. Is it OK, if I concentrate on the rep-units ? – Peter Dec 18 '21 at 12:47
  • 1
    @Peter, Ok you will search the repunits and I will search for (10^p+1)/11 but the next probable prime for this case I should check is 268207. It will take some hours of checking I guess. – kijinSeija Dec 18 '21 at 12:54

1 Answers1

1

It generally works with most primes, I've thrown this sort of test (in a more refined form) at literally millions of numbers.

You could look at http://www.os2fan2.com/gloss/maths.pdf where I give a working function to deal with this sort of problem.

The Messerine test amounts to that if $p = 7\pmod{24}$, then isoquad(4,(p+1)/4, 2, 4)=0 makes p prime. A run over the first million cases produced only a handful of fails. If p+1 = 2^x.(odd), and 2^x > odd, then this is sufficient proof that p is prime.

The messerine test in the form above depends on that the prime is upper-long, ie the period divides p+1 an odd number of times. A result of 0 equates to a quarter-period.

The particular test that you are running will of course demonstrate that if p is prime, it will divide either S(p+1)-2 or S(p-1)-2, and that the value at p is adjacent to both sides of the value it divides (ie upper vs lower).

The thing is somewhat more robust than the small fermat theorom, which states that if p is prime, then p | (b^(p-1)-1. This is because this class of bases equates to that p | (b^p-1)-2 or p | b^(p+1)-2, and it is harder to create a composite number that divides both these values (p-1, p+1).

For example, 1729 is a pseudoprime to every base. It has three divisors, 7, 13, and 19, with individual periods of 6, 12, 18. This means that 1/1729 in any base has a period that divides 36, and 36 divides 1728. So b^1728-1 is a multiple of 1729.

A number like 341 is a pseudoprime to 2, in that 341 | 2^340 - 1, but 341 = 11 *31. In base 2, 341 has a 10-digit period, and 10 A 341.

  • Thanks for your answer. Surprisingly, I can't find a pattern for $(6^p-1)/5$ for example. – kijinSeija Dec 17 '21 at 13:55
  • You don't need to find a pattern. Here it would be x^2-3 would do the trick, since your equations amount to the basis of shortchords of polygons. I have evaluated these to those polynomials as far as the 81st power. With ISOQUAD, you can enter the values directly, ie ISOQUAD (x, (6^p-1) %5, 2, p) – wendy.krieger Dec 17 '21 at 13:59
  • 1
    The full set of equations you might want to look at is at http://www.os2fan2.com/files/isoroot.zip . This file contains the primitive factors as far as 81 places (ie starting x^81+... The equations that the shortchords of a polygon p solve are given at 2p. – wendy.krieger Dec 21 '21 at 10:36