[seqfan] Re: Differences Between Some Primes (Stupid Question?)
maximilian.hasler at gmail.com
Sun Nov 23 20:26:57 CET 2008
PS: follow-up concerning your first sequence:
A065381 Primes not of the form p + 2^k, p prime and k >= 0.
On Sun, Nov 23, 2008 at 2:43 PM, Leroy Quet <q1qq2qqq3qqqq at yahoo.com> wrote:
> %S A152075 3,5,7,13,13,19,19,29,29,31,37,43,43
> %N A152075 a(n) = the smallest prime p > p(n) such that p - p(n) is squarefree, where p(n) is the nth prime.
forprime(p=1,10^3, q=p; until( issquarefree(q-p), q=nextprime(q+1));
> %S A152076 2,3,5,5,11,11,17,17,23,29,31,31
> %N A152076 a(n) = the largest prime p < p(n) such that p(n) - p is squarefree, where p(n) is the nth prime. a(n) = 0 if no such prime p exists.
> %C A152076 Does every odd prime differ from some smaller prime by a squarefree integer? Or is there at least one term of this sequence equal to 0?
> %Y A152076 A152075
> %K A152076 more,nonn
> %O A152076 2,1
forprime(p=1,10^3, q=p; while( q=precprime(q-1), issquarefree(q-p) &
> Is there always a prime that satisfies the conditions of these sequences? Or are the sequences sometimes undefined (or equal to 0, in the case of A152076)?
It seems as if (at least up to 10^5)
But it might be interesting to note the quite rare cases for which a(n)<a(n-1) :
(15:19) gp > q=0; forprime(p=1,10^5, qq=q; q=p; while(
q=precprime(q-1), issquarefree(q-p) & break); q<qq &
> In the case of A152075 it seems to be *VERY* likely that every term exists.
> As for sequences A152073 and A152076, it seems that a simple check of terms would soon bring up a case where each sequence is not defined or is 0, if there are any such cases. (Perhaps if I just checked a couple more primes by hand I would have come across such a case.)
For the first one : indeed (bad luck you didn't amend the "a(n)=0
else" for that one...)
More information about the SeqFan