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.

A194162 Partial sums of A194161.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 11, 14, 18, 22, 27, 33, 39, 46, 53, 61, 69, 77, 86, 95, 105, 115, 126, 138, 150, 163, 176, 190, 204, 218, 233, 248, 264, 280, 296, 313, 331, 349, 368, 387, 407, 428, 449, 471, 493, 515, 538, 562, 586, 611, 636, 661, 687, 714, 741, 769
Offset: 1

Views

Author

Clark Kimberling, Aug 18 2011

Keywords

Crossrefs

Cf. A194161.

Programs

  • Mathematica
    r = Sqrt[2];
    a[n_] := Floor[Sum[FractionalPart[k*r], {k, 1, n}]]
    Table[a[n], {n, 1, 90}]
    s[n_] := Sum[a[k], {k, 1, n}]   (* A194161 *)
    Table[s[n], {n, 1, 100}]
    b[n_] := Floor[n (n + 1) r/2] - Sum[Floor[k*r], {k, 1, n}]
    Table[b[n], {n, 1, 90}]   (* A194162 *)
  • PARI
    b(n) = floor(sum(k=1, n, frac(k*sqrt(2))));
    a(n) = sum(k=1, n, b(k)); \\ Michel Marcus, Nov 06 2017