[seqfan] Re: Differences Between Some Primes (Stupid Question?)
Maximilian Hasler
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));
print1(q","))
3,5,7,13,13,19,19,29,29,31,37,43,43,53,53,59,61,67,73,73,79,89,89,103,103,103,109,109,131,127,137,137,139,149,151,157,163,173,173,179,181,191,193,199,199,229,233,229,229,239,239,241,251,257,263,269,271,277,283,283,293,307,313,313,347,331,337,347,349,359,359,373,373,
379,389,389,419,419,431,419,421,431,433,439,449,449,463,463,463,509,509,509,509,521,509,509,523,523,557,547,557,563,569,571,577,587,593,599,601,607,613,619,619,641,641,643,653,653,659,661,683,683,683,709,701,727,719,733,733,739,761,757,757,787,787,811,787,797,811,811,821,823,829,829,839,853,859,859,881,877,883,883,929,929,929,937,929,967,947,947,953,967,977,977,983,997,997,1019
> %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) &
break); print1(q","))
0,2,3,5,5,11,11,17,17,23,29,31,31,41,41,47,53,59,61,61,71,73,73,83,83,79,101,101,107,107,113,109,131,137,139,149,151,157,157,167,173,179,181,191,191,197,197,197,197,227,227,233,239,241,251,257,263,269,271,271,281,283,293,281,311,311,317,331,337,347,347,353,353,367
> 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 &
print1(primepi(p)","))
26,32,64,79,89,92,98,100,123,127,129,133,136,148,152,159,164,169,181,193,204,206,215,225,230,233,240,243,248,252,271,275,294,296,313
,320,326,358,362,364,369,371,379,395,401,410,412,426,433,436,440,446,456,472,477,479,483,518,520,528,530,534,538,548,563,566,572,574
,595,598,600,603,608,624,634,642,649,654,675,681,689,692,702,708,729,737,751,766,776,802,811,834,839,869,872,912,921,925,936,938,946
> 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...)
Maximilian
More information about the SeqFan
mailing list