OFFSET
0,5
COMMENTS
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.
LINKS
FORMULA
a(n) = floor((Pi*n - floor(Pi*n))*n).
MATHEMATICA
a[n_]:=Floor[FractionalPart[Pi*n]*n];
Table[a[n], {n, 0, 100}]
(* uncomment following lines to count increasing subsequences.
The function MySplit[c] splits the sequence c into monotonically increasing subsequences *)
(*
MySplit[c_List]:=Module[{d={{c[[1]]}}, k=1},
Do[If[c[[j]]>c[[j-1]], AppendTo[d[[k]], c[[j]]] , AppendTo[d, {c[[j]]}]; k++], {j, 2, Length[c]}]; Return[d]];
tab=Table[a[n], {n, 1, 2^20 }];
Map[Length, MySplit[tab], 1] // Tally
*)
PROG
(PARI) a(n) = frac(Pi*n)*n\1; \\ Michel Marcus, Jul 07 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Andres Cicuttin, Jul 04 2020
STATUS
approved