|
|
A227617
|
|
Smallest m such that A100707(m) = n.
|
|
4
|
|
|
1, 2, 5, 3, 19, 8, 4, 6, 17, 15, 13, 11, 9, 7, 34, 30, 28, 26, 32, 24, 22, 10, 12, 14, 16, 18, 20, 61, 57, 55, 53, 51, 49, 47, 45, 43, 41, 59, 39, 23, 114, 37, 25, 27, 21, 29, 31, 35, 112, 110, 33, 108, 106, 104, 100, 98, 96, 94, 92, 90, 88, 86, 84, 82, 80
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
If A100707 is a permutation of the natural numbers, then this sequence is its inverse;
|
|
LINKS
|
|
|
PROG
|
b-file
(Haskell)
import qualified Data.Map as Map (null, insert)
import Data.Map (empty, deleteFindMin)
a227617 n = a227617_list !! (n-1)
a227617_list = f 1 empty $ zip a100707_list [1..] where
f i mp (uv:uvs)
| Map.null mp = f i (uncurry Map.insert uv mp) uvs
| y == i = x : f (i + 1) (uncurry Map.insert uv mp') uvs
| otherwise = f i (uncurry Map.insert uv mp) uvs
where ((y, x), mp') = deleteFindMin mp
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|