[seqfan] A160058 vs A137869 / Re: OEIS duplicate hunt

Maximilian Hasler maximilian.hasler at gmail.com
Sat May 2 16:22:28 CEST 2009


On Sat, May 2, 2009 at 9:06 AM, Richard Mathar wrote:
>
> Are the following pairs of sequences related?
>
> http://research.att.com/~njas/sequences/?q=id:A160058|id:A137869
> 53,157,173,211,251,257,263,293,
> 53,89,157,173,211,251,257,263,293,331,337,359,367,373,389,409,

%N A137869 is incorrect, the title should be "... by a distance > 4"
(I think -- else, 23 should be there).

p=q=2;forprime(r=2,999,r-q>4 & q-p>4 & print1(q","); p=q; q=r)
53,89,157,173,211,251,257,263,293,331,337,359,367,373,389,409,449,479,509,541,547,557,563,577,
587,593,607,631,653,683,691,701,709,719,727,733,751,787,797,839,919,929,947,953,977,983,991,

A160058 is different (and actually a subsequence), it can be defined as
"Prime whose distance to both nearest neighbours is not of the form 2^k"

t=0;p=2;forprime(q=3,999, t*(t=q-p-1<<valuation(q-p,2)) & print1(p","); p=q)
or a little more explicit
p=1;q=2;forprime(r=3,999,t & r-q!=1<<valuation(r-q,2) &
q-p!=2^valuation(q-p,2) & print1(q","); p=q; q=r)
53,157,173,211,251,257,263,293,331,337,373,509,541,547,557,563,577,587,593,607,631,653,733,787,797,839,947,953,977,

t=0;q=2;forprime(r=3,999, t & (t=r-q-1<<valuation(r-q,2)) &
print1(q","); p=q; q=r)

Maximilian




More information about the SeqFan mailing list