The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A282846 Start with a(0) = 0, c = 1, p = 2. Thereafter, if a(n) < c, then a(n+1) = a(n) + p and p is set to the next larger prime; else, a(n+1) = a(n) - c and c is set to the next larger composite number. 7
 0, 2, 1, 4, 0, 5, 12, 6, 17, 9, 0, 13, 3, 20, 8, 27, 13, 36, 21, 5, 34, 16, 47, 27, 6, 43, 21, 62, 38, 13, 56, 30, 3, 50, 22, 75, 45, 13, 72, 39, 5, 66, 31, 98, 62, 24, 95, 56, 16, 89, 47, 3, 82, 37, 120, 74, 26, 115, 66, 16, 113, 62, 10, 111, 57, 2, 105, 49, 156, 99, 41, 150, 90, 28, 141, 78, 14, 141, 76, 10, 141, 73, 4, 141, 71, 210, 138, 64, 213 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS First differences are primes and negative nonprimes; their absolute values yield a permutation of the positive integers. See A282864 for the permutation of the nonnegative integers corresponding to the order in which the numbers are used in this sequence. LINKS M. F. Hasler, Table of n, a(n) for n = 0..10000 (a(0..5000) from Jean-Marc Falcoz.) E. Angelini, Le restaurant new-yorkais, February 2017 MAPLE P:=proc(q) local a, c, n, p; a:=0; c:=1; p:=2; print(a); for n from 1 to q do if a

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.

Last modified April 4 08:58 EDT 2020. Contains 333213 sequences. (Running on oeis4.)