OFFSET
1,1
COMMENTS
EXAMPLE
a(8) has to be a multiple of 8; 80 is the smallest one that satisfies all conditions: 80 is coprime to 9, abs(a(7) - 80) = 73 is prime and distinct from all earlier absolute differences 2, 5, 3, 7, 13, 11. Hence a(8) = 80.
a(9) has to be a multiple of 9; 9 is the smallest one that satisfies all conditions: 9 is coprime to 10, abs(a(8) - 9) = 71 is prime and distinct from all earlier absolute differences 2, 5, 3, 7, 13, 11, 73. Hence a(9) = 9.
PROG
(PARI) {print1(a=2, ", "); v=Set([]); for(n=2, 63, k=1; b=1; while(b, m=k*n; p=abs(m-a); if(gcd(m, n+1)==1&&isprime(p)&&setsearch(v, p)==0, v=setunion(v, Set(p)); print1(m, ", "); a=m; b=0, k++)))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 04 2004
EXTENSIONS
Edited, corrected and extended by Klaus Brockhaus, Jul 14 2004
STATUS
approved