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.

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

Original entry on oeis.org

1, 2, 4, 7, 13, 14, 16, 19, 25, 26, 28, 31, 43, 55, 67, 70, 71, 72, 73, 74, 76, 77, 79, 82, 83, 84, 85, 86, 88, 89, 91, 94, 95, 96, 97, 98, 100, 101, 103, 106, 112, 113, 115, 118, 124, 125, 127, 130, 142, 154, 166, 241, 253, 265, 310, 311, 313, 316, 322, 323
Offset: 1

Views

Author

Clark Kimberling, Aug 24 2011

Keywords

Comments

See A194368.

Crossrefs

Cf. A194368.

Programs

  • Mathematica
    r = Sqrt[2]; c = 2/3;
    x[n_] := Sum[FractionalPart[k*r], {k, 1, n}]
    y[n_] := Sum[FractionalPart[c + k*r], {k, 1, n}]
    t1 = Table[If[y[n] < x[n], 1, 0], {n, 1, 300}];
    Flatten[Position[t1, 1]]         (* A194422 *)
    t2 = Table[If[y[n] == x[n], 1, 0], {n, 1, 300}];
    Flatten[Position[t2, 1]]         (* A194423 *)
    %/3                              (* A194424 *)
    t3 = Table[If[y[n] > x[n], 1, 0], {n, 1, 300}];
    Flatten[Position[t3, 1]]         (* A194425 *)