Ulam Sequence Calculator

Enter a number to check if it belongs to the Ulam sequence, or specify \( N \) to calculate the Nth term and the sum of the sequence.

Ulam Sequence Calculate

What is the Ulam Sequence?

The Ulam sequence is a sequence of integers defined as follows:

  • Initial Terms: \( U_1 = 1 \), \( U_2 = 2 \).
  • Recursive Relation: For \( n > 2 \), \( U_n \) is the smallest integer greater than all previous terms that can be expressed as the sum of two distinct earlier terms in exactly one way.

How to Check if a Number is in the Ulam Sequence

  1. Generate the Sequence: Create Ulam sequence terms up to or beyond the number in question.
  2. Compare: Verify if the input number appears in the generated sequence.
  3. Result: If the number is found, it belongs to the Ulam sequence; otherwise, it does not.

Examples

Example 1: Is 10 in the Ulam Sequence?

Solution:

Generate the sequence:

\( U_1= 1 \)

\( U_2 = 2 \)

\( U_3 = 3 \)

\( U_4 = 4 \)

\( U_5 = 6 \)

\( U_6 = 8 \)

\( U_7 = 11 \)

Result:

Since \( U_7 = 11 > 10 \), : 10 is not in the Ulam sequence.

Example 2: Is 180 in the Ulam Sequence?

Solution:

Generate the sequence:

\( U_1= 1 \)

\( U_2 = 2 \)

\( U_3 = 3 \)

\( U_4 = 4 \)

\( U_5 = 6 \)

\( U_{35} = 155 \)

\( U_{36} = 175 \)

\( U_{37} = 177 \)

\( U_{38} = 180 \)

Result:

Since \( U_{38} = 180 \),180 belongs to the Ulam sequence.

First 100 Terms of the Ulam Sequence

  • U1 = 1
  • U2 = 2
  • U3 = 3
  • U4 = 4
  • U5 = 6
  • U6 = 8
  • U7 = 11
  • U8 = 13
  • U9 = 16
  • U10 = 18
  • U11 = 26
  • U12 = 28
  • U13 = 36
  • U14 = 38
  • U15 = 47
  • U16 = 48
  • U17 = 53
  • U18 = 57
  • U19 = 62
  • U20 = 69
  • U21 = 72
  • U22 = 77
  • U23 = 82
  • U24 = 87
  • U25 = 97
  • U26 = 99
  • U27 = 102
  • U28 = 106
  • U29 = 114
  • U30 = 126
  • U31 = 131
  • U32 = 138
  • U33 = 145
  • U34 = 148
  • U35 = 155
  • U36 = 175
  • U37 = 177
  • U38 = 180
  • U39 = 182
  • U40 = 189
  • U41 = 197
  • U42 = 206
  • U43 = 209
  • U44 = 219
  • U45 = 221
  • U46 = 236
  • U47 = 238
  • U48 = 241
  • U49 = 243
  • U50 = 253
  • U51 = 258
  • U52 = 260
  • U53 = 273
  • U54 = 282
  • U55 = 309
  • U56 = 316
  • U57 = 319
  • U58 = 324
  • U59 = 339
  • U60 = 341
  • U61 = 356
  • U62 = 358
  • U63 = 363
  • U64 = 370
  • U65 = 382
  • U66 = 390
  • U67 = 400
  • U68 = 402
  • U69 = 409
  • U70 = 412
  • U71 = 414
  • U72 = 429
  • U73 = 431
  • U74 = 434
  • U75 = 441
  • U76 = 451
  • U77 = 456
  • U78 = 483
  • U79 = 485
  • U80 = 497
  • U81 = 502
  • U82 = 522
  • U83 = 524
  • U84 = 544
  • U85 = 546
  • U86 = 566
  • U87 = 568
  • U88 = 585
  • U89 = 602
  • U90 = 605
  • U91 = 607
  • U92 = 612
  • U93 = 624
  • U94 = 627
  • U95 = 646
  • U96 = 668
  • U97 = 673
  • U98 = 685
  • U99 = 688
  • U100 = 690