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 A370831 #18 Mar 28 2024 23:40:56 %S A370831 4,2,6,3,7,5,9,6,10,8,12,9,13,11,14,12,15,13,17,15,18,16,19,17,21,18, %T A370831 22,20,24,21,25,23,26,24,27,25,29,26,30,27,31,29,33,30,34,31,35,33,36, %U A370831 34,38,36,39,37,40,38,42,39,43,41,44,42,45,43,47,44,48,45,49,46 %N A370831 Alternating sum of composites. %C A370831 Unlike equivalent sequence for primes, A008347, there are repeated terms. %F A370831 a(n) = A002808(n) - a(n-1), for n>1. %e A370831 a(4) = 9 - 8 + 6 - 4 = 3. %t A370831 Join[{4},a[1]=4;a[n_]:=ResourceFunction["Composite"][n] - a[n-1];Table[a[n],{n,2,70}]] (* or with signs *) R=70;a[1]=4;a[n_]:=a[n-1]-ResourceFunction["Composite"][n] *(-1)^n;Table[a[n],{n,70}] %Y A370831 Cf. A002808, A008347. %K A370831 nonn %O A370831 1,1 %A A370831 _James C. McMahon_, Mar 02 2024