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.

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

Original entry on oeis.org

1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 35, 37, 38, 39, 40, 41, 43, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 83, 85, 86, 87, 88, 89, 91, 97, 99, 100
Offset: 1

Views

Author

Clark Kimberling, Aug 23 2011

Keywords

Comments

See A194368.

Crossrefs

Programs

  • Mathematica
    r = Sqrt[7]; c = 1/2;
    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, 100}];
    Flatten[Position[t1, 1]]   (* A194378 *)
    t2 = Table[If[y[n] == x[n], 1, 0], {n, 1, 300}];
    Flatten[Position[t2, 1]]  (* A194379 *)
    t3 = Table[If[y[n] > x[n], 1, 0], {n, 1, 800}];
    Flatten[Position[t3, 1]]   (* A194380 *)