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 A358537 #71 Feb 16 2023 19:41:39 %S A358537 1,1,2,2,5,4,4,2,2,5,7,8,6,11,10,16,5,22,6,19,15,22,20,9,18,5,14,16, %T A358537 23,9,8,11,16,12,19,21,0,21,8,20,11,17,25,28,4,18,4,30,23,40,7,20,18, %U A358537 18,14,9,40,9,29,32,23,6,17,23,16,8,26,32,35,27,64,10 %N A358537 For n > 0, a(n) is the total number of terms in all contiguous subsequences of the terms up to a(n-1) that sum to n; a(0) = 1. %H A358537 Robert Israel, <a href="/A358537/b358537.txt">Table of n, a(n) for n = 0..10000</a> %e A358537 To find a(4), we look at the sequence so far (1, 1, 2, 2) to find contiguous subsequences that sum to 4: (1, 1, 2) and (2, 2). This is five terms in total, so a(4) = 5. Notice that the two subsequences overlap. %e A358537 a(40) is 11 because the following contiguous subsequences sum to 40: (6, 19, 15); (23, 9, 8); (19, 21); (19, 21, 0). This is a total of 11 terms. %p A358537 N:= 100: V:= Array(0..N): %p A358537 V[0]:= 1: %p A358537 for n from 0 to N-1 do %p A358537 s:= 0; %p A358537 for j from n to 0 by -1 do %p A358537 s:= s + V[j]; %p A358537 if s > N then break fi; %p A358537 if s > n then V[s]:= V[s] + n-j+1 fi; %p A358537 od; %p A358537 od: %p A358537 convert(V,list); # _Robert Israel_, Feb 16 2023 %o A358537 (PARI) { for (n=1, #a=m=vector(72), print1 (a[n] = if (n==1, 1, m[n-1])", "); s = w = 0; forstep (k=n, 1, -1, w++; if ((s += a[k]) > #m, break, s, m[s] += w))) } \\ _Rémy Sigrist_, Feb 09 2023 %Y A358537 Cf. A359034, A331614, A359634. %K A358537 nonn,look %O A358537 0,3 %A A358537 _Neal Gersh Tolunsky_, Dec 18 2022 %E A358537 Data edited by _Yifan Xie_, Feb 08 2023 %E A358537 More terms from _Rémy Sigrist_, Feb 09 2023