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

A180076 a(n+1) = if it exists, smallest number not occurring earlier that is contained in binary representation of a(n), otherwise: a(n+1) = 3*a(n)+1; a(0) = 0.

Original entry on oeis.org

0, 1, 4, 2, 7, 3, 10, 5, 16, 8, 25, 6, 19, 9, 28, 12, 37, 18, 55, 11, 34, 17, 52, 13, 40, 20, 61, 14, 43, 21, 64, 32, 97, 24, 73, 36, 109, 22, 67, 33, 100, 50, 151, 23, 70, 35, 106, 26, 79, 15, 46, 139, 69, 208, 80, 241, 30, 91, 27, 82, 41, 124, 31, 94, 47, 142, 71, 214, 53, 160
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 14 2010

Keywords

Comments

Permutation of the natural numbers with inverse A180077;
if a(n-1) > a(n) then a(n) < a(n+1) = 3*a(n)+1;
see A180110 for m with a(m-2) < a(m-1) < a(m);
A180078(n) = a(a(n));
a(A180079(n)) = A180079(a(n)) = A180077(n);
A180080 and A180081 give record values and where they occur.

Crossrefs

Cf. A030308.
Cf. A062383.

Programs

  • Haskell
    import Data.List (delete)
    a180076 n = a180076_list !! n
    a180076_list :: [Integer]
    a180076_list = 0 : f 0 [1..] where
       f x zs = y : f y (delete y zs) where
         y = if null ys then 3 * x + 1 else head ys
         ys = [y | y <- takeWhile (< x) zs, binInfix y x]
       binInfix u v = ib v where
         ib w = w `mod` m == u || w > u && ib (w `div` 2)
         m = a062383 u
    -- Reinhard Zumkeller, Mar 13 2014, Feb 19 2013

A180077 Inverse permutation to A180076.

Original entry on oeis.org

0, 1, 3, 5, 2, 7, 11, 4, 9, 13, 6, 19, 15, 23, 27, 49, 8, 21, 17, 12, 25, 29, 37, 43, 33, 10, 47, 58, 14, 99, 56, 62, 31, 39, 20, 45, 35, 16, 93, 127, 24, 60, 106, 28, 75, 143, 50, 64, 71, 79, 41, 95, 22, 68, 129, 18, 164, 148, 120, 112, 141, 26, 110, 108, 30, 89, 77, 38, 91, 52
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 14 2010

Keywords

Comments

A180079(n) = a(a(n));
a(A180078(n)) = A180078(a(n)) = A180076(n).

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a180077 = fromJust . (`elemIndex` a180076_list)
    -- Reinhard Zumkeller, Mar 13 2014

A180079 A180077(A180077(n)).

Original entry on oeis.org

0, 1, 5, 7, 3, 4, 19, 2, 13, 23, 11, 12, 49, 43, 58, 79, 9, 29, 21, 15, 10, 99, 16, 28, 39, 6, 64, 120, 27, 104, 164, 110, 62, 127, 25, 143, 45, 8, 135, 107, 33, 141, 46, 14, 162, 85, 41, 30, 66, 48, 60, 83, 37, 91, 152, 17, 355, 80, 170, 331, 286, 47, 336, 190, 56, 114, 97
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 14 2010

Keywords

Comments

Permutation of the natural numbers with inverse A180078;
a(A180076(n)) = A180076(a(n)) = A180077(n).
Showing 1-3 of 3 results.