ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 02 Oct 2018 14:11:42 -0500Help in generating Ulam numbershttps://ask.sagemath.org/question/43818/help-in-generating-ulam-numbers/I want to generate a list of Ulam numbers, with an Ulam number being defined by Wikipedia as "a member of an integer sequence that starts with U_1 = 1 and U_2 = 2. Then for n > 2, U_n is defined to be the smallest integer that is the sum of two distinct earlier terms in exactly one way and larger than all earlier terms." The code I've written doesn't work but there's insufficient room here to post.Tue, 02 Oct 2018 08:16:52 -0500https://ask.sagemath.org/question/43818/help-in-generating-ulam-numbers/Comment by tmonteil for <p>I want to generate a list of Ulam numbers, with an Ulam number being defined by Wikipedia as "a member of an integer sequence that starts with U_1 = 1 and U_2 = 2. Then for n > 2, U_n is defined to be the smallest integer that is the sum of two distinct earlier terms in exactly one way and larger than all earlier terms." The code I've written doesn't work but there's insufficient room here to post.</p>
https://ask.sagemath.org/question/43818/help-in-generating-ulam-numbers/?comment=43827#post-id-43827Could you please provide your code ? There **is** sufficient room.Tue, 02 Oct 2018 14:11:42 -0500https://ask.sagemath.org/question/43818/help-in-generating-ulam-numbers/?comment=43827#post-id-43827Comment by dazedANDconfused for <p>I want to generate a list of Ulam numbers, with an Ulam number being defined by Wikipedia as "a member of an integer sequence that starts with U_1 = 1 and U_2 = 2. Then for n > 2, U_n is defined to be the smallest integer that is the sum of two distinct earlier terms in exactly one way and larger than all earlier terms." The code I've written doesn't work but there's insufficient room here to post.</p>
https://ask.sagemath.org/question/43818/help-in-generating-ulam-numbers/?comment=43821#post-id-43821This isn't a Sage related issue; it's a Python coding question. You can find working Python code for this problem on the internet with a simple internet search.Tue, 02 Oct 2018 10:35:17 -0500https://ask.sagemath.org/question/43818/help-in-generating-ulam-numbers/?comment=43821#post-id-43821