login
A259431
Inverse of permutation in A183209.
2
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,2
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 *)
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a259431 = (+ 1) . fromJust . (`elemIndex` a183209_list)
-- Reinhard Zumkeller, Jun 27 2015
CROSSREFS
Cf. A183209.
Sequence in context: A156031 A119475 A096116 * A085875 A330615 A302850
KEYWORD
nonn,look
AUTHOR
Alois P. Heinz, Jun 26 2015
STATUS
approved