[seqfan] Re: prime + factorial = prime
Klaus Brockhaus
klaus-brockhaus at t-online.de
Mon Mar 1 23:07:24 CET 2010
Leroy Quet schrieb:
> Second, the definition to A092789 seems to be completely wrong.
> It seems what was meant was instead, a(n) = the smallest prime of the form p(n) + m!, where p(n) is the nth prime", or something like that.
>
> In that case, the offset would be wrong too.
>
>
Yes, I think
%N A092789 a(n) = smallest prime of the form p(n) + m!, where p(n) is the n-th prime.
%O A092789 1,1
is correct. I wrote a quick-and-dirty MAGMA program (below) which
confirms this.
Regards
Klaus Brockhaus
S:=[]; for n in [1..80] do p:=NthPrime(n); for m in [0..100] do
q:=p+Factorial(m); if IsPrime(q) then Append(~S, q); break; end if; end
for; end for; S;
Magma V2.16-6 Tue Mar 2 2010 08:52:27 [Seed = 1352084513]
-------------------------------------
[ 3, 5, 7, 13, 13, 19, 19, 43, 29, 31, 37, 43, 43, 67, 53, 59, 61, 67,
73, 73,
79, 103, 89, 113, 103, 103, 109, 109, 229, 137, 151, 137, 139, 163, 151,
157,
163, 283, 173, 179, 181, 363061, 193, 199, 199, 223, 331, 229, 229, 349,
239,
241, 5281, 257, 263, 269, 271, 277, 283, 283, 307, 317, 313, 313, 337,
40637,
337, 457, 349, 373, 359, 383, 373, 379, 499, 389, 509, 421, 521, 433 ]
Total time: 0.290 seconds, Total memory usage: 9.44MB
More information about the SeqFan
mailing list