login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096879 a(1) = 1; 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

%S 1,4,9,16,5,18,35,16,63,10,77,36,13,56,135,32,289,18,209,100,63,176,

%T 115,144,175,26,405,56,319,90,31,128,495,34,245,72,481,38,351,40,779,

%U 126,43,704,45,184,47,240,637,50,357,520,53,486,55,392,285,58,767,120,793,992

%N a(1) = 1; 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 Suggested by A096134.

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

%e a(8) has to be a multiple of 8; 16 is the smallest one that satisfies all conditions: 16 is coprime to 9, abs(a(7) - 16) = 19 is prime and distinct from all earlier absolute differences 3, 5, 7, 11, 13, 17. Hence a(8) = 16.

%o (PARI) {print1(a=1,",");v=Set([]);for(n=2,62,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. A096134, A096880.

%K nonn

%O 1,2

%A _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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 25 13:59 EDT 2021. Contains 348253 sequences. (Running on oeis4.)