Go Back > Great Internet Mersenne Prime Search > Software

Thread Tools
Old 2017-06-14, 14:41   #1
CRGreathouse's Avatar
Aug 2006

3·1,993 Posts
Default Linear() -> Lucas in pfgw

I'm searching for primes in a Fibonacci-like recurrence:
a(1) = 8193, a(2) = 28618, a(n) = a(n-1) + a(n-2).

I entered an ABC2 file like so
ABC2 Linear(8193, 28618, 36811, 65429, $a)
a: from 1 to 100000
and pfgw seems to search it, but it gives the message with each a value:
Linear() -> Lucas P=1,Q=-1
so I think it wants me to enter it differently. What's the right way?
CRGreathouse is offline   Reply With Quote
Old 2017-06-14, 15:20   #2
paulunderwood's Avatar
Sep 2002
Database er0rr

1111010111112 Posts

C.3.3 Linear
The Linear() function will attempt to find a two-term recurrence
relation with constant coefficients to fit the input data. The
coefficients it discovers are output to the screen and may be
used in lucasU or lucasV. The two Lucas sequences are 'primitive'
solutions to the recurrence relation, and it is up to the user
to work out what their Linear() function is in terms of them.
The 'primitive' solutions have factorization properties, while
the general Linear() solution does not.
If the Linear() function fails to fit the data, the expression
will not evaluate.

I am not sure about how it is done!

The manual goes on to say:

C.3.4 lucasV
The Lucas sequences are defined via a standard recurrence

U(0)=0 U(1)=1 U(n) = pU(n-1)-qU(n-2)
V(0)=2 V(1)=p V(n) = pV(n-1)-qV(n-2)

These definitions allow the functions U and V to possess a
standard set of identities, no matter the values of p and q.
However, even values of p will produce a V-sequence that is
always even - searchers should either remove this factor 2,
or use the primitive part.
So if your sequence cannot have <0,1> nor <2,p>, then I guess you are stuck with Linear. If you are running Linux you can redirect the noise to /dev/null

Last fiddled with by paulunderwood on 2017-06-14 at 15:43
paulunderwood is offline   Reply With Quote
Old 2017-06-14, 16:05   #3
CRGreathouse's Avatar
Aug 2006

3·1,993 Posts

You know, I think I just miscalculated the first time around, because it looks like it is indeed a linear combination of the relevant Lucas sequences, which in this case are the Lucas sequence and the Fibonacci sequence:

(20425*L($a) - 4039*F($a))/2

Sorry for the trouble.
CRGreathouse is offline   Reply With Quote

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linear Congruence order 4 sequence not testing in PFGW? carpetpool Software 14 2017-07-13 19:54
PFGW 3.3.6 or PFGW 3.4.2 Please update now! Joe O Sierpinski/Riesel Base 5 5 2010-09-30 14:07
Linear algebra at 600% CRGreathouse Msieve 8 2009-08-05 07:25
Linear algebra proof Damian Math 8 2007-02-12 22:25
Linear algebra in MPQS R1zZ1 Factoring 2 2007-02-02 06:45

All times are UTC. The time now is 15:16.

Sun Dec 5 15:16:15 UTC 2021 up 135 days, 9:45, 1 user, load averages: 1.39, 1.31, 1.29

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.