trendlist.simple.pows

trendlist.simple.pows(n: int, base: int = 2, start: int = 0) list[int]

Return sequence of n powers of the base.

n specifies how many ints in the returned list

base permits specifying the base, for example, base=5 returns [5^0, …, 5^(n-1)]

start permits returning the numbers in a different (rotated) order, for example, start=3 will give the numbers in the order “3rd, 4th, … nth, 0th, 1st, 2nd”

Args:

n: how many powers to return base: what base to use for the powers start: how many positions to rotate the sequence before starting

Returns:

IntList

TODO: I don’t think it’s worth adding a “reverse” argument. Amiright?