login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Partial sums of A325931.
1

%I #20 Jan 09 2021 22:45:14

%S 0,1,2,3,4,3,4,5,4,5,4,5,6,5,6,5,6,5,6,5,6,7,6,7,6,7,6,7,6,7,6,7,6,7,

%T 6,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,9,8,9,8,9,8,9,

%U 8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9,8,9

%N Partial sums of A325931.

%C This sequence is the "tier profile" of A076042, much as A064289 provides a similar profile of Recamán's Sequence (A005132). In each case, the base sequence jumps around between adjacent "tiers", each of which changes value relatively slowly (compared to the difference between entries in different tiers). As in Recamán's sequence, each tier rises for a while, then crests, and finally falls close to zero, at which point that tier becomes extinct. The tier structure is salient when viewing the graph of such a sequence.

%C This sequence is less chaotic than A064289, since in A076042 only two tiers are active at time, and the sequence alternates between the two until the lower tier stops, at which point a double increase inaugurates a new tier.

%H Alois P. Heinz, <a href="/A325933/b325933.txt">Table of n, a(n) for n = 0..65536</a>

%F a(0) = 0; a(n) = a(n-1) + A325931(n).

%e a(20) = a(19) + A325931(20) = 5 + 1 = 6.

%p b:= proc(n) option remember; `if`(n=0, 0, (t->

%p t+`if`(t<n^2, 1, -1)*n^2)(b(n-1)))

%p end:

%p a:= proc(n) option remember; `if`(n=0, 0,

%p a(n-1)+signum(b(n)-b(n-1)))

%p end:

%p seq(a(n), n=0..105); # _Alois P. Heinz_, Sep 08 2019

%t b[n_] := b[n] = If[n == 0, 0, b[n - 1] + If[b[n - 1] < n^2, n^2, -n^2]];

%t b /@ Range[0, 105] // Differences // Sign // Accumulate // Prepend[#, 0]& (* _Jean-François Alcover_, Nov 30 2020 *)

%Y Cf. A076042, A325931.

%K nonn,easy

%O 0,3

%A _Allan C. Wechsler_, Sep 08 2019