mersenneforum.org Linear() -> Lucas in pfgw
 Register FAQ Search Today's Posts Mark Forums Read

 2017-06-14, 14:41 #1 CRGreathouse     Aug 2006 10111011000112 Posts 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 Code: 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: Code: Linear() -> Lucas P=1,Q=-1 so I think it wants me to enter it differently. What's the right way? 2017-06-14, 15:20 #2 paulunderwood Sep 2002 Database er0rr 23·3·11·17 Posts Quote:  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: Quote:  C.3.4 lucasV The Lucas sequences are defined via a standard recurrence relation: 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  2017-06-14, 16:05 #3 CRGreathouse Aug 2006 5,987 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.

 Similar Threads Thread Thread Starter Forum Replies Last Post carpetpool Software 14 2017-07-13 19:54 Joe O Sierpinski/Riesel Base 5 5 2010-09-30 14:07 CRGreathouse Msieve 8 2009-08-05 07:25 Damian Math 8 2007-02-12 22:25 R1zZ1 Factoring 2 2007-02-02 06:45

All times are UTC. The time now is 21:31.

Tue Jan 31 21:31:41 UTC 2023 up 166 days, 19 hrs, 0 users, load averages: 1.13, 1.20, 1.10