ApasScript.

Array Generation

divisors

Every positive divisor of n, in increasing order, including 1 and n itself.

primesUpTo

Every prime number less than or equal to n, in increasing order.

firstNPrimes

The first n prime numbers, in increasing order.

cumsum

The running (cumulative) sum of a list of numbers, given either as separate arguments or as a single bound array.

cumprod

The running (cumulative) product of a list of numbers, given either as separate arguments or as a single bound array.

factorize

The prime factorization of n, displayed as a product of prime powers (e.g. 2^2 * 7).

range

An array from start up to (but not including) end, stepping by step (defaults to 1).

linspace

n evenly spaced values from start to end, both ends inclusive.

logspace

n values evenly spaced on a logarithmic scale, from base^startExp to base^endExp (base defaults to 10).