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. Of exact numbers, works while the last answer has at most 2600 digits (the bottom of a fraction counts twice); decimals have no such limit.

factorize

The prime factorization of n, displayed as a product of prime powers (e.g. 2^2 * 7). Works on any whole number of up to 38 digits: trial division up to a million, then Miller-Rabin and Pollard's rho for what is left, so factorize(2^64 + 1) is 274177 * 67280421310721; a number whose smallest prime factor is above about 10^12 is refused with a note. factor(n) is the same.

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).