cp's OEIS Frontend

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.

A359034 a(n+1) is the sum of the number of terms in all groups of contiguous terms that add up to a(n); a(1)=1.

This page as a plain text file.
%I A359034 #35 Apr 09 2023 11:49:58
%S A359034 1,1,2,3,3,4,4,5,3,5,4,6,6,7,7,8,10,11,4,7,9,9,10,12,13,14,13,15,8,11,
%T A359034 7,10,13,16,19,18,18,19,19,20,7,11,8,12,14,14,15,9,11,9,12,15,10,14,
%U A359034 16,20,14,17,17,18,22,22,23,22,24,23,23,24,24,25,28,27,22
%N A359034 a(n+1) is the sum of the number of terms in all groups of contiguous terms that add up to a(n); a(1)=1.
%C A359034 If strongly smoothened, this sequence displays growth. This growth appears to be caused by the number of groups which is increasing by growing length of the sequence roughly proportional to n^(1/2). But the length of the groups appears to be nearly uninfluenced by this. - _Thomas Scheuerle_, Dec 14 2022
%H A359034 Neal Gersh Tolunsky, <a href="/A359034/b359034.txt">Table of n, a(n) for n = 1..10000</a>
%H A359034 Thomas Scheuerle, <a href="/A359034/a359034.png">Scatter plot of a(n) per number of groups found. For n = 1...20000</a>. This is the mean number of contiguous terms for each n.
%H A359034 Thomas Scheuerle, <a href="/A359034/a359034_1.png">Scatter plot, number of groups of contiguous terms for n = 1...20000</a>
%e A359034 a(17) is 10 because in the sequence so far (1, 1, 2, 3, 3, 4, 4, 5, 3, 5, 4, 6, 6, 7, 7, 8), these are the ways of adding contiguous terms to get a(16)=8: (2, 3, 3); (4, 4); (5, 3); (3, 5); (8). This is 10 terms in total, so a(17) is 10. Notice groups (5,3) and (3,5) overlap.
%o A359034 (MATLAB)
%o A359034 function a = A359034( max_n )
%o A359034     a = [1 1];
%o A359034     for n = 3:max_n
%o A359034         s = 1; e = 1; sm = 1; c = 0;
%o A359034         while e < n-1
%o A359034             while sm < a(n - 1) && e < (n - 1)
%o A359034                 e = e + 1; sm = sm + a(e);
%o A359034             end
%o A359034             if sm == a(n - 1)
%o A359034                 c = c + (e - s) + 1;
%o A359034             end
%o A359034             s = s + 1;
%o A359034             e = s; sm = a(s);
%o A359034         end
%o A359034         a(n) = c + 1;
%o A359034     end
%o A359034 end % _Thomas Scheuerle_, Dec 14 2022
%Y A359034 Cf. A331614, A358919. Begins the same as A124056 (until a(13)).
%K A359034 nonn
%O A359034 1,3
%A A359034 _Neal Gersh Tolunsky_, Dec 12 2022