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!)
A330402 Lexicographically earliest sequence of distinct positive terms with an associate sequence t such that t(0) = 0, and for any n > 0, at least one of t(n-1) - a(n) or t(n-1) + a(n) is a prime number; in case t(n-1) - a(n) is a prime number, set t(n) = t(n-1) - a(n), otherwise set t(n) = t(n-1) + a(n). 3
2, 1, 4, 5, 3, 6, 8, 10, 11, 9, 12, 14, 16, 18, 24, 20, 22, 28, 30, 26, 32, 34, 38, 36, 42, 40, 46, 44, 50, 45, 15, 54, 48, 21, 17, 52, 56, 60, 62, 66, 58, 70, 64, 78, 68, 27, 29, 72, 74, 80, 82, 84, 76, 96, 86, 39, 35, 90, 98, 102, 88, 41, 51, 104, 94, 100 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This sequence is a variant of A330401.
LINKS
EXAMPLE
The first terms, alongside t(n), are:
n a(n) t(n)
-- ---- ----
0 N/A 0
1 2 2
2 1 3
3 4 7
4 5 2
5 3 5
6 6 11
7 8 3
8 10 13
9 11 2
10 9 11
11 12 23
12 14 37
PROG
(PARI) See Links section.
CROSSREFS
Cf. A330401, A330421 (running totals).
Sequence in context: A144203 A354699 A239806 * A075302 A352520 A350313
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Dec 13 2019
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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)