OFFSET
1,1
COMMENTS
Original definition: First occurrence of the first k-th occurrence where (p-q)/(q-k), p,q,k are primes.
From the original definition and program (which gives different results depending on the upper limit n) it is not obvious, but for any odd prime r, a solution will always be found for q=nextprime(r+1), by considering the r-th prime of the form p=q+(q-r)*prime(i), i=1,2,3... - M. F. Hasler, Apr 05 2009
EXAMPLE
For the first odd prime r=3 and its successor prime q=5, (p-q)/(q-r) is prime for p=11, 19, 31, ... and the (r=3)-rd ratio is (31-5)/(5-3)=13=a(1). - M. F. Hasler, Apr 05 2009
PROG
(PARI) diff2sqp2(n, r, d) = { forprime(q=d+1, n, c=0; forprime(p=q+1, n, y=(p-q)/(q-d); if(y==floor(y), if(isprime(y), c++; if(c==r, print1(y", "); break)) ) ) ) } diff2sqp3(n) = { forprime(k=3, n, diff2sqp2(n, k, k); print(); ) }
(PARI) A089577(n) = { local( q=prime(n+2), r=prime(n+1), d=q-r, y=1); until( isprime( q+d*y=nextprime(y+1)) & ! r--, ) ; y} \\ M. F. Hasler, Apr 05 2009
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Dec 29 2003
EXTENSIONS
Corrected, extended and edited by M. F. Hasler, Apr 05 2009
STATUS
approved