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.

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

This page as a plain text file.
%I A194402 #11 Feb 15 2021 02:19:16
%S A194402 2,4,6,8,10,12,14,16,18,20,26,28,34,36,38,40,42,44,46,48,50,52,54,60,
%T A194402 62,68,70,72,74,76,78,80,82,84,86,88,90,92,98,100,106,108,110,112,114,
%U A194402 116,118,120,122,124,126,132,134,140,142,144,146,148,150,152,154
%N A194402 Numbers m such that Sum_{k=1..m} (<1/2 + k*r> - <k*r>) = 0, where r=(1+sqrt(5))/2 and < > denotes fractional part.
%C A194402 Every term is even; see A194368 and A194403.
%t A194402 r = GoldenRatio; c = 1/2;
%t A194402 x[n_] := Sum[FractionalPart[k*r], {k, 1, n}]
%t A194402 y[n_] := Sum[FractionalPart[c + k*r], {k, 1, n}]
%t A194402 t1 = Table[If[y[n] < x[n], 1, 0], {n, 1, 200}];
%t A194402 Flatten[Position[t1, 1]]       (* A194401 *)
%t A194402 t2 = Table[If[y[n] == x[n], 1, 0], {n, 1, 200}];
%t A194402 Flatten[Position[t2, 1]]       (* A194402 *)
%t A194402 %/2       (* A194403 *)
%t A194402 t3 = Table[If[y[n] > x[n], 1, 0], {n, 1, 200}];
%t A194402 Flatten[Position[t3, 1]]       (* A194404 *)
%Y A194402 Cf. A001622, A194368, A194401, A194403, A194404.
%K A194402 nonn
%O A194402 1,1
%A A194402 _Clark Kimberling_, Aug 24 2011