|
|
A096134
|
|
a(1) = 2; for n > 1: a(n) = least multiple m of n such that m is coprime to n+1 and the absolute difference of a(n) and a(n-1) is a prime distinct from all earlier such differences of consecutive terms.
|
|
2
|
|
|
2, 4, 9, 12, 5, 18, 7, 80, 9, 40, 11, 48, 65, 112, 15, 128, 85, 18, 209, 100, 21, 44, 391, 24, 125, 208, 27, 224, 493, 30, 341, 64, 231, 68, 175, 36, 185, 418, 39, 80, 697, 84, 215, 88, 225, 46, 329, 48, 539, 100, 153, 364, 1007, 54, 715, 56, 285, 58, 767, 120, 61, 1178, 315
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Condition gcd(a(n),n+1) = 1 ensures that a(n+1) exists.
Primes arising as absolute first differences are given in A096878.
For corresponding sequence starting (more naturally) at 1 see A096879.
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|