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

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A022837 a(n) = c(0)*p(0) + ... + c(n)*p(n), where c(i) = 1 if a(i-1) < p(i) and c(i) = -1 if a(i-1) >= p(i) (p(0) = 1, p(i) = prime(i)). 10
 1, 3, 0, 5, 12, 1, 14, 31, 12, 35, 6, 37, 0, 41, 84, 37, 90, 31, 92, 25, 96, 23, 102, 19, 108, 11, 112, 9, 116, 7, 120, 247, 116, 253, 114, 263, 112, 269, 106, 273, 100, 279, 98, 289, 96, 293, 94, 305, 82, 309, 80, 313, 74, 315, 64, 321, 58, 327, 56, 333, 52, 335 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS Alternative definition: a(0)=1; thereafter a(n) = a(n-1) + prime(n) if a(n-1) < prime(n), otherwise a(n) = a(n-1) - prime(n). Cf. A008348. - N. J. A. Sloane, Aug 31 2019 LINKS Seiichi Manyama, Table of n, a(n) for n = 0..10000 EXAMPLE From Seiichi Manyama, Sep 05 2019: (Start) a(0) = 1. a(1) = 1 + 2 = 3. a(2) = 1 + 2 - 3 = 0. a(3) = 1 + 2 - 3 + 5 = 5. a(4) = 1 + 2 - 3 + 5 + 7 = 12. a(5) = 1 + 2 - 3 + 5 + 7 - 11 = 1. (End) CROSSREFS Cf. A000040, A008348, A008578. See also A324787, A324788, A324789, A324790. Sequence in context: A143280 A326988 A088521 * A328631 A225950 A088969 Adjacent sequences:  A022834 A022835 A022836 * A022838 A022839 A022840 KEYWORD nonn AUTHOR EXTENSIONS Missing a(46)=94 inserted and name corrected by Sean A. Irvine, May 21 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 23 04:16 EST 2020. Contains 331168 sequences. (Running on oeis4.)