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.

Showing 1-1 of 1 results.

A054082 Permutation of N: a(1)=2, a(2)=1 and for each k >= 2, let p(k)=least natural number not already an a(i), q(k)=p(k)+k-1, a(2k-1)=q(k), a(2k)=p(k).

Original entry on oeis.org

2, 1, 4, 3, 7, 5, 9, 6, 12, 8, 15, 10, 17, 11, 20, 13, 22, 14, 25, 16, 28, 18, 30, 19, 33, 21, 36, 23, 38, 24, 41, 26, 43, 27, 46, 29, 49, 31, 51, 32, 54, 34, 56, 35, 59, 37, 62, 39, 64, 40, 67, 42, 70, 44, 72, 45, 75, 47, 77, 48, 80, 50, 83
Offset: 1

Views

Author

Keywords

Crossrefs

Odd-indexed terms: A026356. Even-indexed terms: A026355. Inverse permutation: A064579.

Programs

  • Mathematica
    a[n_] := If[OddQ[n], Floor[((n+1)/2 - 1) GoldenRatio] + (n+1)/2 + 1, Floor[(n/2 - 1) GoldenRatio] + 2]; a[2] = 1;
    Array[a, 100] (* Jean-François Alcover, Apr 01 2020 *)
Showing 1-1 of 1 results.