[go: up one dir, main page]

login
Revision History for A094747 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
Rearrangement of odd primes so that absolute successive differences are the least distinct even numbers. Priority is given to the least successive difference that has not occurred earlier.
(history; published version)
#7 by Jon E. Schoenfield at Sat Aug 08 20:14:33 EDT 2015
STATUS

editing

approved

#6 by Jon E. Schoenfield at Sat Aug 08 20:14:31 EDT 2015
MAPLE

A094747 := proc(nmax) local a, diffs, d; a := [3] ; diffs := {} ; while nops(a) < nmax do d := 2 ; while true do if isprime(op(-1, a)-d) and not op(-1, a)-d in a and not abs(d) in diffs then a := [op(a), op(-1, a)-d] ; diffs := diffs union {d} ; break ; elif isprime(op(-1, a)+d) and not op(-1, a)+d in a and not abs(d) in diffs then a := [op(a), op(-1, a)+d] ; diffs := diffs union {d} ; break ; else d := d+2 ; fi ; od ; od; RETURN(a) ; end: A094747(100) ; - _# _R. J. Mathar_, Jul 29 2007

STATUS

approved

editing

#5 by N. J. A. Sloane at Thu Dec 05 19:56:51 EST 2013
AUTHOR

_Amarnath Murthy (amarnath_murthy(AT)yahoo.com), _, May 24 2004

Discussion
Thu Dec 05
19:56
OEIS Server: https://oeis.org/edit/global/2075
#4 by Russ Cox at Fri Mar 30 17:38:57 EDT 2012
COMMENTS

We interpret the definition as saying that we find a(n+1) from a(n) by testing a(n)-+2*d (first the minus, then the plus, d=1,2,3,4...., d not used before) for primality and for not already being on the list. This creates a list of odd primes, but there is no proof (yet) that all odd primes are in the sequence. - _R. J. Mathar (mathar(AT)strw.leidenuniv.nl), _, Jul 29 2007

MAPLE

A094747 := proc(nmax) local a, diffs, d; a := [3] ; diffs := {} ; while nops(a) < nmax do d := 2 ; while true do if isprime(op(-1, a)-d) and not op(-1, a)-d in a and not abs(d) in diffs then a := [op(a), op(-1, a)-d] ; diffs := diffs union {d} ; break ; elif isprime(op(-1, a)+d) and not op(-1, a)+d in a and not abs(d) in diffs then a := [op(a), op(-1, a)+d] ; diffs := diffs union {d} ; break ; else d := d+2 ; fi ; od ; od; RETURN(a) ; end: A094747(100) ; - _R. J. Mathar (mathar(AT)strw.leidenuniv.nl), _, Jul 29 2007

EXTENSIONS

More terms from _R. J. Mathar (mathar(AT)strw.leidenuniv.nl), _, Jul 29 2007

Discussion
Fri Mar 30
17:38
OEIS Server: https://oeis.org/edit/global/190
#3 by N. J. A. Sloane at Sun Jun 29 03:00:00 EDT 2008
COMMENTS

We interpret the definition as saying that we find a(n+1) from a(n) by testing a(n)-+2*d (first the minus, then the plus, d=1,2,3,4...., d not used before) for primality and for not already being on the list. This creates a list of odd primes, but there is no proof (yet) that all odd primes are in the sequence. - Richard R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jul 29 2007

MAPLE

A094747 := proc(nmax) local a, diffs, d; a := [3] ; diffs := {} ; while nops(a) < nmax do d := 2 ; while true do if isprime(op(-1, a)-d) and not op(-1, a)-d in a and not abs(d) in diffs then a := [op(a), op(-1, a)-d] ; diffs := diffs union {d} ; break ; elif isprime(op(-1, a)+d) and not op(-1, a)+d in a and not abs(d) in diffs then a := [op(a), op(-1, a)+d] ; diffs := diffs union {d} ; break ; else d := d+2 ; fi ; od ; od; RETURN(a) ; end: A094747(100) ; - Richard R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jul 29 2007

KEYWORD

nonn,new

nonn

EXTENSIONS

More terms from Richard R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jul 29 2007

#2 by N. J. A. Sloane at Sat Nov 10 03:00:00 EST 2007
DATA

3, 5, 11, 7, 17, 29, 37, 23, 41, 61, 83, 67, 43, 71, 97, 127, 163, 131, 89, 137, 103, 59, 19, 73, 13, 79, 149, 199, 251, 307, 269, 223, 281, 349, 277, 353, 431, 367, 293, 373, 311, 229, 313, 227, 139, 47, 151, 241, 337, 239, 347, 449, 563, 463, 557, 673, 797, 691, 809

COMMENTS

We interpret the definition as saying that we find a(n+1) from a(n) by testing a(n)-+2*d (first the minus, then the plus, d=1,2,3,4...., d not used before) for primality and for not already being on the list. This creates a list of odd primes, but there is no proof (yet) that all odd primes are in the sequence. - Richard J. Mathar (mathar(AT)strw.leidenuniv.nl), Jul 29 2007

MAPLE

A094747 := proc(nmax) local a, diffs, d; a := [3] ; diffs := {} ; while nops(a) < nmax do d := 2 ; while true do if isprime(op(-1, a)-d) and not op(-1, a)-d in a and not abs(d) in diffs then a := [op(a), op(-1, a)-d] ; diffs := diffs union {d} ; break ; elif isprime(op(-1, a)+d) and not op(-1, a)+d in a and not abs(d) in diffs then a := [op(a), op(-1, a)+d] ; diffs := diffs union {d} ; break ; else d := d+2 ; fi ; od ; od; RETURN(a) ; end: A094747(100) ; - Richard J. Mathar (mathar(AT)strw.leidenuniv.nl), Jul 29 2007

KEYWORD

more,nonn,new

nonn

EXTENSIONS

More terms from Richard J. Mathar (mathar(AT)strw.leidenuniv.nl), Jul 29 2007

#1 by N. J. A. Sloane at Sat Jun 12 03:00:00 EDT 2004
NAME

Rearrangement of odd primes so that absolute successive differences are the least distinct even numbers. Priority is given to the least successive difference that has not occurred earlier.

DATA

3, 5, 11, 7, 17, 29, 37, 23, 41, 61, 83, 67

OFFSET

1,1

CROSSREFS

Cf. A094748.

KEYWORD

more,nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), May 24 2004

STATUS

approved