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.

A259431 Inverse of permutation in A183209.

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 7, 6, 17, 13, 10, 11, 33, 8, 25, 19, 18, 21, 65, 14, 15, 49, 12, 37, 35, 34, 41, 129, 26, 27, 29, 20, 97, 23, 22, 73, 69, 66, 67, 81, 16, 257, 51, 50, 53, 57, 38, 39, 193, 36, 45, 43, 42, 145, 137, 130, 131, 133, 28, 161, 31, 30, 513, 101, 98
Offset: 1

Views

Author

Alois P. Heinz, Jun 26 2015

Keywords

Crossrefs

Cf. A183209.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a259431 = (+ 1) . fromJust . (`elemIndex` a183209_list)
    -- Reinhard Zumkeller, Jun 27 2015
  • Mathematica
    b[n_] := b[n] = If[n==1, 1, If[EvenQ[n], 3b[n/2]-1, Floor[3b[(n+1)/2]/2]]];
    a[n_] := Module[{k = 1}, While[n != b[k], k++]; k];
    Array[a, 100] (* Jean-François Alcover, Sep 04 2021 *)