login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #4 Dec 05 2013 19:56:53

%S 2,4,9,12,5,18,7,80,9,40,11,48,65,112,15,128,85,18,209,100,21,44,391,

%T 24,125,208,27,224,493,30,341,64,231,68,175,36,185,418,39,80,697,84,

%U 215,88,225,46,329,48,539,100,153,364,1007,54,715,56,285,58,767,120,61,1178,315

%N 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.

%C Condition gcd(a(n),n+1) = 1 ensures that a(n+1) exists.

%C Primes arising as absolute first differences are given in A096878.

%C For corresponding sequence starting (more naturally) at 1 see A096879.

%e 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.

%e 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.

%o (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++)))}

%Y Cf. A096878, A096879.

%K nonn

%O 1,1

%A _Amarnath Murthy_, Jul 04 2004

%E Edited, corrected and extended by _Klaus Brockhaus_, Jul 14 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 12:33 EDT 2024. Contains 371969 sequences. (Running on oeis4.)