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.

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

Original entry on oeis.org

4, 6, 10, 12, 16, 18, 22, 24, 28, 30, 34, 40, 46, 52, 58, 64, 104, 110, 116, 122, 128, 134, 138, 140, 144, 146, 150, 152, 156, 158, 162, 164, 168, 170, 172, 176, 178, 182, 184, 188, 190, 194, 196, 200, 202, 204, 208, 210, 214, 216, 220, 222, 226, 228
Offset: 1

Views

Author

Clark Kimberling, Aug 23 2011

Keywords

Comments

See A194368.

Crossrefs

Programs

  • Mathematica
    r = Sqrt[8]; 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]]   (* A194381 *)
    t2 = Table[If[y[n] == x[n], 1, 0], {n, 1, 300}];
    Flatten[Position[t2, 1]]   (* A194382 *)
    %/2  (* A194383 *)
    t3 = Table[If[y[n] > x[n], 1, 0], {n, 1, 600}];
    Flatten[Position[t3, 1]]   (* A194384 *)