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.

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

This page as a plain text file.
%I A194373 #15 Feb 16 2021 01:03:25
%S A194373 3,7,11,29,33,37,41,43,44,45,47,48,49,51,52,53,55,59,63,67,85,89,93,
%T A194373 97,99,100,101,103,104,105,107,108,109,111,115,119,123,141,145,149,
%U A194373 153,155,156,157,159,160,161,163,164,165,167,171,175,179,197
%N A194373 Numbers m such that Sum_{k=1..m} (<1/2 + k*r> - <k*r>) > 0, where r=sqrt(3) and < > denotes fractional part.
%C A194373 See A194368.
%H A194373 G. C. Greubel, <a href="/A194373/b194373.txt">Table of n, a(n) for n = 1..1000</a>
%t A194373 r = Sqrt[3]; c = 1/2;
%t A194373 x[n_] := Sum[FractionalPart[k*r], {k, 1, n}]
%t A194373 y[n_] := Sum[FractionalPart[c + k*r], {k, 1, n}]
%t A194373 t1 = Table[If[y[n] < x[n], 1, 0], {n, 1, 100}];
%t A194373 Flatten[Position[t1, 1]]  (* A194371 *)
%t A194373 t2 = Table[If[y[n] == x[n], 1, 0], {n, 1, 800}];
%t A194373 Flatten[Position[t2, 1]] (* A194372 *)
%t A194373 t3 = Table[If[y[n] > x[n], 1, 0], {n, 1, 100}];
%t A194373 Flatten[Position[t3, 1]] (* A194373 *)
%o A194373 (PARI) isok(n) = sum(k=1, n, frac(1/2+k*sqrt(3)) - frac(k*sqrt(3))) > 0; \\ _Michel Marcus_, Sep 10 2018
%Y A194373 Cf. A194368, A194371.
%K A194373 nonn
%O A194373 1,1
%A A194373 _Clark Kimberling_, Aug 23 2011