Superincreasing sequence
≈ 1 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
In mathematics, a sequence of positive real numbers (s_1, s_2, ...) is called superincreasing if every element of the sequence is greater than the sum of all previous elements in the sequence. Formally, this condition can be written as : s_{n+1} > \sum_{j=1}^n s_j for all n ≥ 1.
In mathematics, a sequence of positive real numbers (s_1, s_2, ...) is called superincreasing if every element of the sequence is greater than the sum of all previous elements in the sequence. Formally, this condition can be written as s_{n+1} > \sum_{j=1}^n s_j for all n ≥ 1. def is_superincreasing_sequence(sequence) -> bool: """Tests if a sequence is superincreasing.""" total = 0 result = True for n in sequence: print("Sum: ", total, "Element: ", n) if n This produces the following output: Sum: 0 Element: 1 Sum: 1 Element: 3 Sum: 4 Element: 6 Sum: 10 Element: 13 Sum: 23 Element: 27 Sum: 50 Element: 52 Is it a superincreasing sequence? True The series a^x for a>=2
Text derived from https://en.wikipedia.org/w/index.php?oldid=1369594990 under CC BY-SA 4.0; modifications have been made.