Algorithm to generate an increasing sequence of integers

Design an algorithm to generate the sequence of positive integers (in increasing order) whose only prime divisors are 2 and 3; that is, your program should produce the sequence 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 27, ... . Does your program represent an algorithm in the strict sense?

Solution Preview

A strict algorithm must stop in a finite time. Since "the sequence of positive integers..." has no end (it is infinite), no algorithm in the strict sense can produce it. We could head in the direction of something producible by a strict algorithm by changing the requirement to something like "the sequence of positive integers less than or equal to 200..."

How do we know that the given sequence is infinite? Let us assume, it is not. Then, there is a greatest number ...

Solution Summary

A SQL algorithm to generate the increasing sequence of positive integers whose only prime divisors are 2 and 3. The version will run in SQL 2008 or any edition that supports the += operator. The algorithm can serve as a basis to other SQL languages and implementations or work as pseudo-coded in other contexts.

Comment is made on whether this solution can be considered an algorithm in the strict sense.

Let T[1..n] be a sorted array of distinct integers, some of which may be negative. Give an algorithm that can find an index i such that 1 <= i <= n and T[i] = i, provided such an index exists. Your algorithm should take a time in Big "O" (log n) in worst case.

Suppose that all edge weights in a graph are integers in the range from 1 to |V|. How fast can you make Kruskal's algorithm run? What if the edge weights are integers in the range from 1 to W for some constant W?

Suppose you are given a set P of integers and another integer x. We wish to use a O(n*lg n) algorithm to decide whether there are 2 integers in P whose sum equals to x. Show your algorithm. You can use pseudo code or verbose description to explain your algorithm.
If you need to use any well known standard algorithm in your so

See the attached file.
Given algorithm looks for a value in a nondecreasing sequence and returns the index of the value if it is found or 0 if it is not found.
Input: A sequence si, ...... ,sj (j >= i >= 1) sorted in nondecreasing order, a value key, i, and j
Output: The output is an index k for which sk = key, or if key i

I need assistance with the attached problem. It requires me to show that a given algorithmgenerates the geometric distribution.
Please see the attached document for details.
Show that the following algorithm is valid for generating X -- geom(p)
1. Ler i=0.
2. Generate (please see the attached file) independent of any

Discrete math questions. Please provide formulas and all calculations for all 22. They are very short answer type questions.
2. Write the first four terms of the sequence defined by bj = 1 + 2j, for all integers j 0.
b0 =
b1 =
b2 =
b3 =
14. Find an explicit formula for the sequence with the