This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A022837 #29 Sep 05 2019 14:31:51 %S A022837 1,3,0,5,12,1,14,31,12,35,6,37,0,41,84,37,90,31,92,25,96,23,102,19, %T A022837 108,11,112,9,116,7,120,247,116,253,114,263,112,269,106,273,100,279, %U A022837 98,289,96,293,94,305,82,309,80,313,74,315,64,321,58,327,56,333,52,335 %N 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)). %C A022837 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 %H A022837 Seiichi Manyama, <a href="/A022837/b022837.txt">Table of n, a(n) for n = 0..10000</a> %e A022837 From _Seiichi Manyama_, Sep 05 2019: (Start) %e A022837 a(0) = 1. %e A022837 a(1) = 1 + 2 = 3. %e A022837 a(2) = 1 + 2 - 3 = 0. %e A022837 a(3) = 1 + 2 - 3 + 5 = 5. %e A022837 a(4) = 1 + 2 - 3 + 5 + 7 = 12. %e A022837 a(5) = 1 + 2 - 3 + 5 + 7 - 11 = 1. (End) %Y A022837 Cf. A000040, A008348, A008578. %Y A022837 See also A324787, A324788, A324789, A324790. %K A022837 nonn %O A022837 0,2 %A A022837 _Clark Kimberling_ %E A022837 Missing a(46)=94 inserted and name corrected by _Sean A. Irvine_, May 21 2019