login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers m such that Sum_{k=1..m} (<1/2 + k*r> - <k*r>) > 0, where r=sqrt(14) and < > denotes fractional part.
4

%I #15 Feb 15 2021 02:18:51

%S 3,7,11,15,19,23,27,61,65,69,73,77,81,85,89,91,92,93,95,96,97,99,100,

%T 101,103,104,105,107,108,109,111,112,113,115,116,117,119,123,127,131,

%U 135,139,143,147,181,185,189,193,197,201,205,209,211,212,213,215

%N Numbers m such that Sum_{k=1..m} (<1/2 + k*r> - <k*r>) > 0, where r=sqrt(14) and < > denotes fractional part.

%C See A194368.

%H Robert Israel, <a href="/A194397/b194397.txt">Table of n, a(n) for n = 1..10000</a>

%p r:= sqrt(14):

%p X:= 0: R:= NULL: count:= 0:

%p for n from 1 while count < 100 do

%p X:= X + frac(1/2+n*r) - frac(n*r);

%p if X > 0 then

%p count:= count+1;

%p R:= R, n

%p fi

%p od:

%p R; # _Robert Israel_, Nov 25 2020

%t r = Sqrt[14]; c = 1/2;

%t x[n_] := Sum[FractionalPart[k*r], {k, 1, n}]

%t y[n_] := Sum[FractionalPart[c + k*r], {k, 1, n}]

%t t1 = Table[If[y[n] < x[n], 1, 0], {n, 1, 200}];

%t Flatten[Position[t1, 1]] (* A194395 *)

%t t2 = Table[If[y[n] == x[n], 1, 0], {n, 1, 200}];

%t Flatten[Position[t2, 1]] (* A194396 *)

%t t3 = Table[If[y[n] > x[n], 1, 0], {n, 1, 300}];

%t Flatten[Position[t3, 1]] (* A194397 *)

%Y Cf. A010471 (sqrt(14)), A194368, A194396, A194397.

%K nonn

%O 1,1

%A _Clark Kimberling_, Aug 23 2011