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.

A206928 Position of n+cos(n) when {k+cos(k)} and {k+sin(k)} are jointly ranked; complement of A206929.

Original entry on oeis.org

1, 2, 4, 8, 10, 12, 14, 15, 16, 18, 22, 24, 26, 27, 28, 30, 34, 36, 38, 39, 40, 42, 46, 48, 50, 51, 52, 54, 56, 60, 62, 64, 65, 66, 68, 72, 74, 76, 77, 78, 80, 84, 86, 88, 89, 90, 92, 96, 98, 100, 102, 103, 104, 106, 110, 112, 114, 115, 116, 118, 122, 124, 126
Offset: 1

Views

Author

Clark Kimberling, Feb 13 2012

Keywords

Crossrefs

Cf. A206929.

Programs

  • Mathematica
    f[n_] := N[n + Cos[n]]; z = 120;
    g[n_] := N[n + Sin[n]];
    c = Table[f[n], {n, 1, z}];
    s = Table[g[n], {n, 1, z}];
    j = Sort[Union[c, s]];
    p[n_] := Position[j, f[n]]; q[n_] := Position[j, g[n]];
    Flatten[Table[p[n], {n, 1, z}]]    (* A206928 *)
    Flatten[Table[q[n], {n, 1, z}]]    (* A206929 *)