Get Math Help

GET TUTORING NEAR ME!

By submitting the following form, you agree to Club Z!'s Terms of Use and Privacy Policy

    Ulam Sequence

    Sequence description

    a_1 = 1; a_2 = 2; subsequent terms are the lowest numbers which are unique sums of two distinct earlier terms

    Sequence terms

    1, 2, 3, 4, 6, 8, 11, 13, 16, 18, 26, 28, 36, 38, 47, 48, 53, 57, 62, 69, 72, 77, 82, ...

    Table program

    Function[n, With[{Ulam = Compile[{{nmax, _Integer}, {init, _Integer, 1}, {s, _Integer}}, Module[{ulamhash = Table[0, {nmax}], ulam = init}, ulamhash[[ulam]] = 1; Do[If[Quotient[Plus @@ ulamhash[[i - ulam]], 2] == s, AppendTo[ulam, i]; ulamhash[[i]] = 1], {i, Last[init] + 1, nmax}]; ulam]]}, Ulam[14 n, {1, 2}, 1]]]

    Plot

    Plot

    Find the right fit or it’s free.

    We guarantee you’ll find the right tutor, or we’ll cover the first hour of your lesson.