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
1, 4, 9, 16, 5, 18, 35, 16, 63, 10, 77, 36, 13, 56, 135, 32, 289, 18, 209, 100, 63, 176, 115, 144, 175, 26, 405, 56, 319, 90, 31, 128, 495, 34, 245, 72, 481, 38, 351, 40, 779, 126, 43, 704, 45, 184, 47, 240, 637, 50, 357, 520, 53, 486, 55, 392, 285, 58, 767, 120, 793, 992 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Suggested by A096134.

Primes arising as absolute first differences are given in A096880.

LINKS

Table of n, a(n) for n=1..62.

EXAMPLE

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.

PROG

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

CROSSREFS

Cf. A096134, A096880.

Sequence in context: A070643 A070442 A086957 * A070441 A070440 A054580

Adjacent sequences:  A096876 A096877 A096878 * A096880 A096881 A096882

KEYWORD

nonn

AUTHOR

Klaus Brockhaus, Jul 14 2004

STATUS

approved

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 September 23 05:44 EDT 2021. Contains 347609 sequences. (Running on oeis4.)