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-2 of 2 results.

A227617 Smallest m such that A100707(m) = n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 19 2013

Keywords

Comments

If A100707 is a permutation of the natural numbers, then this sequence is its inverse;
A227632 and A227633 give record values and where they occur:
a(A227633(n)) = A227632(n); A227633(n) = A100707(A227632(n)).

Programs

  • 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

A227632 Record values in A227617.

Original entry on oeis.org

1, 2, 5, 19, 34, 61, 114, 175, 1094, 1695, 3390, 9372, 15605, 116478, 220288, 455587, 552188
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 19 2013

Keywords

Comments

a(n) = A227617(A227633(n));
A227633(n) = A100707(a(n)).

Programs

  • Haskell
    a227632 n = a227632_list !! (n-1)
    (a227632_list, a227633_list) = unzip $ (1,1) : f 1 1 a227617_list where
       f i v (q:qs) | q > v = (q,i) : f (i + 1) q qs
                    | otherwise = f (i + 1) v qs
Showing 1-2 of 2 results.