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.

A365819 a(n) = a(n-1) - 1 + floor(median(a) - mean(a)) where a(0) = 0, a(1) = 1, and median(a) and mean(a) are respectively the median and mean of all previous terms.

This page as a plain text file.
%I A365819 #29 Oct 14 2024 23:57:43
%S A365819 0,1,0,-2,-3,-4,-5,-7,-8,-9,-10,-11,-12,-13,-15,-17,-19,-21,-22,-23,
%T A365819 -24,-25,-26,-27,-27,-27,-27,-27,-28,-29,-31,-33,-36,-39,-43,-47,-51,
%U A365819 -54,-57,-59,-61,-63,-64,-65,-65,-65,-65,-64,-63,-61,-58,-55,-51,-47,-43,-39,-35,-31,-28,-25,-22,-19
%N A365819 a(n) = a(n-1) - 1 + floor(median(a) - mean(a)) where a(0) = 0, a(1) = 1, and median(a) and mean(a) are respectively the median and mean of all previous terms.
%C A365819 The median of an even number of terms is taken as the mean of its middle two values, (x+y)/2.
%C A365819 The sequence seems to present a chaotic pattern. What is its asymptotic behavior?
%H A365819 Robert Israel, <a href="/A365819/b365819.txt">Table of n, a(n) for n = 0..10000</a>
%H A365819 Thomas Scheuerle, <a href="/A365819/a365819.png">Plot a(0)..a(20000)</a>.
%H A365819 Thomas Scheuerle, <a href="/A365819/a365819_1.png">Plot n = 0..200000</a>, blue: a(n)/10, red: mean(a(0)..a(n)), orange: 10*(median(a(0)..a(n))-mean(a(0)..a(n))). We observe new emergent chaos after periods of apparent calming.
%p A365819 R:= [0,1]:
%p A365819 for i from 2 to 10000 do
%p A365819   v:= R[-1] - 1 + floor(Statistics:-Median(R) - Statistics:-Mean(R));
%p A365819   R:= [op(R),v]
%p A365819 od:
%p A365819 R; # _Robert Israel_, Oct 14 2024
%t A365819 a = {0, 1};
%t A365819 Do[AppendTo[a, Last[a] - 1 + Floor[Median[a] - Mean[a]]], {j, 1, 100}]
%t A365819 a[[1 ;; 100]]
%o A365819 (MATLAB)
%o A365819 function a = A365819( max_n )
%o A365819     a = [0 1];
%o A365819     for n = 3:max_n
%o A365819         a(n) = a(n-1) - 1 + floor(median(a) - mean(a));
%o A365819     end
%o A365819 end % _Thomas Scheuerle_, Dec 15 2023
%K A365819 sign
%O A365819 0,4
%A A365819 _Andres Cicuttin_, Dec 14 2023