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!)
A282865 Lexicographic first permutation of the nonnegative integers such that the partial sums of (-1)^isprime(a(n))*a(n) always remain nonnegative. 4
0, 1, 4, 2, 3, 6, 5, 8, 7, 9, 11, 10, 12, 13, 14, 17, 15, 19, 16, 18, 23, 20, 29, 21, 22, 31, 24, 37, 25, 26, 41, 27, 28, 43, 30, 47, 32, 33, 53, 34, 35, 59, 36, 61, 38, 39, 67, 40, 42, 71, 44, 45, 73, 46, 79, 48, 49, 83, 50, 51, 89, 52, 54, 97, 55, 56, 101, 57, 103, 58, 60, 107, 62, 63, 109, 64, 65, 113, 66, 68, 127, 69, 70, 131, 72, 137, 74, 75 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
A variant of A282864, having the same definition except for opposite signs.
LINKS
PROG
(PARI) {print1(s=0); c=1; p=2; for(n=1, 199, if(s>=p, a=-p; p=nextprime(p+1), a=c; while(isprime(c++), )); print1(", "abs(a)); s+=a)}
CROSSREFS
Sequence in context: A128009 A072425 A361747 * A241051 A275590 A338844
KEYWORD
nonn
AUTHOR
M. F. Hasler, Feb 23 2017
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 September 13 18:22 EDT 2024. Contains 375910 sequences. (Running on oeis4.)