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.

A238862 Inverse permutation to A239965.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 5, 9, 11, 8, 10, 12, 14, 15, 13, 18, 20, 16, 24, 19, 17, 21, 23, 25, 22, 27, 29, 26, 28, 30, 32, 33, 31, 35, 37, 38, 36, 41, 43, 39, 47, 51, 34, 40, 42, 44, 46, 48, 45, 50, 52, 49, 53, 55, 57, 54, 58, 60, 61, 56, 65, 63, 66, 59, 64, 69, 72
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 30 2014

Keywords

Comments

a(A239965(n)) = A239965(a(n)) = n;
A018252(a(n)) = A240024(n).

Crossrefs

Cf. A239943 (fixed points).

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a238862 = (+ 1) . fromJust . (`elemIndex` a239965_list)

A239943 Fixed points of the permutations A239965 and A238862.

Original entry on oeis.org

1, 2, 3, 4, 12, 23, 30, 48, 50, 53, 68, 79, 80, 81, 92, 104, 105, 110, 112, 122, 131, 138, 149, 153, 160, 180, 185, 191, 201, 208, 216, 223, 242, 265, 279, 292, 308, 310, 317, 332, 337, 344, 348, 351, 362, 374, 381, 401, 410, 416, 431, 436, 446, 451, 454
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 30 2014

Keywords

Comments

a(n) = A239965(a(n)) = A238862(a(n)).

Programs

  • Haskell
    a239943 n = a239943_list !! (n-1)
    a239943_list = [x | x <- [1..], a239965 x == x]

A240024 Nonprime EKG sequence, cf. A064413: a(1) = 1, a(2) = 4 and for n > 2, a(n) = smallest composite number not already used which shares a factor with a(n-1).

Original entry on oeis.org

1, 4, 6, 8, 10, 12, 9, 15, 18, 14, 16, 20, 22, 24, 21, 27, 30, 25, 35, 28, 26, 32, 34, 36, 33, 39, 42, 38, 40, 44, 46, 48, 45, 50, 52, 54, 51, 57, 60, 55, 65, 70, 49, 56, 58, 62, 64, 66, 63, 69, 72, 68, 74, 76, 78, 75, 80, 82, 84, 77, 88, 86, 90, 81, 87, 93
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 30 2014

Keywords

Comments

A239965 gives the position of the n-th nonprime; a(A239965(n))=A018252(n).

Crossrefs

Cf. A064413, A064664 (EKG sequence).

Programs

  • Haskell
    import Data.List (delete, genericIndex)
    a240024 n = genericIndex a240024_list (n - 1)
    a240024_list = 1 : ekg 4 a002808_list where
       ekg x zs = f zs where
           f (y:ys) = if gcd x y > 1 then y : ekg y (delete y zs) else f ys
  • Mathematica
    a = {1, 4}; Do[k = 6; While[Or[PrimeQ@ k, MemberQ[a, k], CoprimeQ[a[[i - 1]], k]], k++]; AppendTo[a, k], {i, 3, 66}]; a (* Michael De Vlieger, Sep 01 2016 *)
Showing 1-3 of 3 results.