[seqfan] Re: What would you call this recurrence relation?
Robert G. Wilson v
rgwv at rgwv.com
Sat Mar 30 02:26:52 CET 2013
Al,
a[1] = 2; a[n_] := Block[{p = q = a[n - 1]}, While[ Mod[q + 1, p - 1] != 0
|| Mod[q - 1, p + 1] != 0, q = NextPrime[q]]; q]; Array[a, 5] (* the slow
way *)
a[1] = 2; a[n_] := Block[{k = 2, p = a[n - 1]}, While[q = k(p - 1) - 1;
!PrimeQ[q] || Mod[q - 1, p + 1] != 0, k++]; q]; Array[a, 7] (* better but
can be improved *)
a[1] = 2; a[n_] := Block[{k = 2, p = a[n - 1]}, While[q = k(p + 1) + 1;
!PrimeQ[q] || Mod[q + 1, p - 1] != 0, k++]; q]; Array[a, 7]
I was able to produce: 2, 7, 17, 127, 7937, 377967871, 571438845655122689,
., .
Please notice that a(6) does not follow Max's formula since with p=7937,
(p^2 - 2 p - 1)/2 = 31490047 is not a prime.
I would call it by the relationships you stated and Yes it is recursive.
a(n) is the least prime q with a(n-1) being p, such that p + 1 divides q - 1
and p - 1 divides q + 1.
Bob.
-----Original Message-----
From: SeqFan [mailto:seqfan-bounces at list.seqfan.eu] On Behalf Of Max
Alekseyev
Sent: Friday, March 29, 2013 12:59 AM
To: Sequence Fanatics Discussion list
Subject: [seqfan] Re: What would you call this recurrence relation?
On Thu, Mar 28, 2013 at 11:35 PM, Alonso Del Arte <alonso.delarte at gmail.com>
wrote:
> Choose a prime p, say p = 2. What is the smallest prime q such that p
> + 1 divides q - 1 and p - 1 divides q + 1 ? (The latter part of the
> question is trivial for now). That would be 7.
>
> Then reset p = 7 and find the corresponding q. That's 17. And so on
> and so forth, giving 2, 7, 17, 127, 7937, ...
In other words, starting from p=7, we have q == -p (mod (p^2 - 1)/2).
I suspect, for many terms we may simply have q = (p^2 - 1)/2 - p, at least
all listed terms are such.
> What would this recurrence relation be called? If it can be called a
> recurrence relation in the first place?
Not every recurrence relation has a special name.
Regards,
Max
_______________________________________________
Seqfan Mailing list - http://list.seqfan.eu/
More information about the SeqFan
mailing list