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 A336017 #35 Mar 07 2021 01:04:51 %S A336017 0,0,0,1,2,3,5,6,1,2,4,6,8,10,13,1,4,6,9,13,16,20,2,5,9,13,17,22,27,3, %T A336017 7,12,16,22,27,33,3,8,14,20,26,33,39,3,10,16,23,30,38,45,3,11,18,26, %U A336017 34,43,52,4,12,20,29,38,48,57,3,13,22,32,42,53,63,3,14,24 %N A336017 a(n) = floor(frac(Pi*n)*n), where frac denotes the fractional part. %C A336017 It seems that the sequence can be split into consecutive short monotonically increasing subsequences. For example, the first 2^20 terms can be split into 139188 subsequences of 7 terms and 9281 subsequences of 8 terms (see commented part of Mathematica program). The distance between two consecutive terms, a(k) and a(k+1), of the same increasing subsequence is about k/7. %H A336017 Wikipedia, <a href="https://en.wikipedia.org/wiki/Equidistribution_theorem">Equidistribution theorem</a>. %F A336017 a(n) = floor((Pi*n - floor(Pi*n))*n). %t A336017 a[n_]:=Floor[FractionalPart[Pi*n]*n]; %t A336017 Table[a[n], {n, 0, 100}] %t A336017 (* uncomment following lines to count increasing subsequences. %t A336017 The function MySplit[c] splits the sequence c into monotonically increasing subsequences *) %t A336017 (* %t A336017 MySplit[c_List]:=Module[{d={{c[[1]]}},k=1}, %t A336017 Do[If[c[[j]]>c[[j-1]],AppendTo[d[[k]],c[[j]]] ,AppendTo[d,{c[[j]]}];k++],{j,2,Length[c]}];Return[d]]; %t A336017 tab=Table[a[n], {n, 1, 2^20 }]; %t A336017 Map[Length, MySplit[tab], 1] // Tally %t A336017 *) %o A336017 (PARI) a(n) = frac(Pi*n)*n\1; \\ _Michel Marcus_, Jul 07 2020 %Y A336017 Cf. A000796, A022844, A336018, A331008. %K A336017 nonn %O A336017 0,5 %A A336017 _Andres Cicuttin_, Jul 04 2020