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.

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

This page as a plain text file.
%I A194416 #12 Feb 15 2021 02:19:42
%S A194416 3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,63,66,69,78,81,84,
%T A194416 93,96,99,108,111,123,126,138,141,153,156,159,162,165,168,171,174,177,
%U A194416 180,183,186,189,192,195,198,201,204,207,216,219,222,231,234
%N A194416 Numbers m such that Sum_{k=1..m} (<1/3 + k*r> - <k*r>) = 0, where r=sqrt(3) and < > denotes fractional part.
%C A194416 Every term is divisible by 3; see A194368.
%t A194416 r = Sqrt[3]; c = 1/3;
%t A194416 x[n_] := Sum[FractionalPart[k*r], {k, 1, n}]
%t A194416 y[n_] := Sum[FractionalPart[c + k*r], {k, 1, n}]
%t A194416 t1 = Table[If[y[n] < x[n], 1, 0], {n, 1, 150}];
%t A194416 Flatten[Position[t1, 1]]           (* A194415 *)
%t A194416 t2 = Table[If[y[n] == x[n], 1, 0], {n, 1, 300}];
%t A194416 Flatten[Position[t2, 1]]           (* A194416 *)
%t A194416 %/3                                (* A194417 *)
%t A194416 t3 = Table[If[y[n] > x[n], 1, 0], {n, 1, 500}];
%t A194416 Flatten[Position[t3, 1]]           (* A194418 *)
%Y A194416 Cf. A002194, A194368, A194415, A194417, A194418.
%K A194416 nonn
%O A194416 1,1
%A A194416 _Clark Kimberling_, Aug 24 2011