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

A251546 a(n) = smallest even number not in {A098550(1), A098550(2), ..., A098550(n)}.

Original entry on oeis.org

2, 4, 4, 6, 6, 6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 24, 24, 30, 30, 30, 30, 30, 30, 38, 38, 40, 40, 40, 40, 40, 40, 40, 46, 46, 46, 46, 46, 46, 46, 46, 54, 54, 54
Offset: 1

Views

Author

N. J. A. Sloane, Dec 18 2014

Keywords

Comments

A251416(n) = Min{a(n), A251549(n)}. - Reinhard Zumkeller, Dec 19 2014

Crossrefs

Programs

  • Haskell
    import Data.List ((\\))
    a251546 n = head $ [2, 4 ..] \\ filter even (take n a098550_list)
    -- Reinhard Zumkeller, Dec 19 2014
  • Mathematica
    terms = 100;
    f[lst_List] := Block[{k = 4}, While[GCD[lst[[-2]], k] == 1 || GCD[lst[[-1]], k] > 1 || MemberQ[lst, k], k++]; Append[lst, k]];
    A098550 = Nest[f, {1, 2, 3}, terms - 3];
    a[1] = 2;
    a[n_] := a[n] = For[k = a[n-1], True, k += 2, If[FreeQ[A098550[[1;;n]], k], Return[k]]];
    Array[a, terms] (* Jean-François Alcover, Aug 01 2018, after Robert G. Wilson v *)
Showing 1-1 of 1 results.