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!)
A084035 a(1) = 1 and then distinct numbers such that the sum as well the absolute difference of successive terms is a prime. 2
1, 4, 7, 10, 3, 8, 5, 2, 9, 14, 17, 6, 11, 18, 13, 16, 21, 26, 15, 22, 19, 12, 25, 28, 31, 36, 23, 20, 27, 32, 29, 24, 35, 38, 33, 40, 43, 30, 37, 34, 39, 44, 57, 46, 51, 56, 45, 52, 49, 54, 47, 42, 55, 48, 41, 60, 53, 50, 63, 68, 71, 66, 61, 78, 59, 72, 65, 62, 69, 58, 81, 70 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Another rearrangement of natural numbers in which a(2k) is even and a(2k+1) is odd.
LINKS
EXAMPLE
17 follows 14 as 14+17 =31 and 17-14 = 3 both are prime and 17 is smallest such number not occurring earlier.
MATHEMATICA
s = {m = 1}; Do[n = 2; While[MemberQ[s, n] || ! PrimeQ[n - m] || ! PrimeQ[n + m], n++]; m = n; AppendTo[s, m = n], {100}]; s (* Zak Seidov, Oct 18 2022 *)
CROSSREFS
Sequence in context: A022541 A330695 A063798 * A103702 A118517 A282848
KEYWORD
nonn
AUTHOR
Amarnath Murthy, May 26 2003
EXTENSIONS
More terms from Ray Chandler, Jun 09 2003
STATUS
approved

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 July 21 09:38 EDT 2024. Contains 374472 sequences. (Running on oeis4.)