Summary
###########################################################################
File: genrfncs.icn
Subject: Procedures to generate sequences
Author: Ralph E. Griswold
Date: June 10, 2001
###########################################################################
This file is in the public domain.
###########################################################################
These procedures generate sequences of results.
arandseq(i, j) arithmetic sequence starting at i with randomly
chosen increment between 1 and j
arithseq(i, j) arithmetic sequence starting at i with increment j
beatty1seq() Beatty's first sequence i * &phi
beatty2seq() Beatty's second sequence i * &phi ^ 2
catlnseq(i) sequence of generalized Catalan numbers
cfseq(i, j) continued-fraction sequence for i / j
chaosseq() chaotic sequence
chexmorphseq() sequence of centered hexamorphic numbers
connellseq(p) generalized Connell sequence
dietzseq(s) Dietz sequence for polynomial
dressseq(i) dress sequence with increment i, default 1 (Schroeder)
eisseq(i) EIS A sequence for i
factseq() factorial sequence
fareyseq(i, k) Farey fraction sequence; k = 0, the default, produces
numerator sequence; k = 1 produces denominator
sequence
fibseq(i, j, k, m) generalized Fibonacci sequence (Lucas sequence)
with initial values i and j and additive constant
k. If m is supplied, the results are produced
mod m.
figurseq(i) series of ith figurate number
fileseq(s, i) generate from file s; if i is null, lines are generated.
Otherwise characters, except line terminators.
friendseq(k) generate random friendly sequence from k values, 1 to k
(in a friendly sequence, successive terms differ by 1).
geomseq(i, j) geometric sequence starting at i with multiplier j
hailseq(i) hailstone sequence starting at i
irepl(i, j) j instances of i
lrrcseq(L1, L2)
generalized linear recurrence with constant
coefficients; L1 is a list of initial terms,
L2 is a list of coefficients for n prevous values,
where n = *L2
meanderseq(s, n) sequences of all characters that contain all n-tuples
of characters from s
mthueseq() Morse-Thue sequence
mthuegseq(i) Morse-Thue sequence for base i
multiseq(i, j, k) sequence of (i * j + k) i's
ngonalseq(i) sequence of the ith polygonal number
nibonacciseq(values[])
generalized Fibonacci sequence that sums the
previous n terms, where n = *values.
partitseq(i, j, k) sequence of integer partitions of i with minimum j
and maximum k
pellseq(i, j, k) generalized Pell's sequence starting with i, j and
using multiplier k
perrinseq() Perrin sequence
polyseq(coeff[]) polynomial in x evaluated for x := seq()
primeseq() the sequence of prime numbers
powerseq(i) sequence n ^ i, n = 1, 2, 3, 4, ...
powersofseq(i) sequence i ^ n, n = 1, 2, 3, 4, ...n
rabbitseq() rabbit sequence
ratsseq(i) versumseq() with sort
signaseq(r) signature sequence of r
spectseq(r) spectral sequence integer(i * r), i - 1, 2, 3, ...
srpseq(n, m) palindromic part of the continued-fraction sequence
for sqrt(n^2+m)
versumseq(i, j) generalized sequence of added reversed integers with
seed i (default 196) and increment j (default 0)
versumopseq(i, p) procedure p (default 1) applied to versumseq(i)
vishwanathseq() random variation on Fibonacci sequence
zebra(values[]) zebra colors, alternating 2 and 1, for number of
times given by successive values
###########################################################################
Requires: co-expressions
###########################################################################
Links: convert, factors, fastfncs, io, lindgen, lists, numbers,
partit, periodic, polynom, rational, strings, xcode
###########################################################################
Procedures:
arandseq, arithseq, beatty1seq, beatty2seq, catlnseq, cfseq, chaosseq, chexmorphseq, connellseq, dietzseq, dressseq, eisseq, eval, factseq, fareydseq, fareyn1seq, fareynseq, fareyseq, fibseq, figurseq, fileseq, form, friendseq, geomseq, hailseq, irepl, linrecseq, lrrcseq, meanderseq, mthuegseq, mthueseq, multiseq, ngonalseq, nibonacciseq, oper, partitseq, pellseq, perrinseq, polyseq, powerseq, powersofseq, primeseq, rabbitseq, ratsseq, signaseq, spectseq, srpseq, versumopseq, versumseq, vishwanathseq, zebra
Records:
entry, farey
Links:
convert.icn, factors.icn, fastfncs.icn, io.icn, lindgen.icn, lists.icn, numbers.icn, partit.icn, periodic.icn, polynom.icn, rational.icn, strings.icn, xcode.icn
This file is part of the (main) package.
Source code.
arandseq(i, j)
: arithmetic sequence with random intervals
arithseq(i, j)
: arithmetic sequence
beatty1seq(r)
: Beatty sequence 1
beatty2seq(r)
: Beatty sequence 2
catlnseq(i)
: generalized Catalan sequence
cfseq(i, j)
: continued-fraction sequence
chaosseq()
: Hofstadter's chaotic sequence
chexmorphseq()
: sequence of centered hexamorphic numbers
connellseq(p, args)
: generalized Connell sequence
dietzseq(str)
dressseq(i)
: dress sequence
eisseq(i)
: EIS A sequence
eval(str)
factseq()
: factorial sequence
fareydseq(i)
: Farey fraction denominator sequence
fareyn1seq(i)
: Farey fraction numerator sequence, 1-based
fareynseq(i)
: Farey fraction numerator sequence
fareyseq(i, k)
: Farey fraction sequence
fibseq(i, j, k, m)
: generalized Fibonacci sequence
figurseq(i)
: sequence of figurate numbers
fileseq(s, i)
: sequence from file
form(str1, op, str2)
friendseq(k)
: random friendly sequence
geomseq(i, j)
: geometric sequence
hailseq(i)
: hailstone sequence
irepl(i, j)
: repeated sequence
linrecseq(terms, coeffs)
: synonym for lrrcseq
lrrcseq(terms, coeffs)
: linear recurrence sequence
meanderseq(alpha, n)
: generate meandering characters
mthuegseq(j)
: generalized Morse-Thue sequence
mthueseq()
: Morse-Thue sequence
multiseq(i, j, k)
: sequence of repeated integers
ngonalseq(i)
: sequence of polygonal numbers
nibonacciseq(values)
: n-valued Fibonacci generalization
oper(str)
partitseq(i, j, k)
: sequence of integer partitions
pellseq(i, j, k)
: generalized Pell sequence
perrinseq()
: perrin sequence
polyseq(coeff)
: sequence of polynomial evaluations
powerseq(i)
: powers sequence
powersofseq(i)
: powers
primeseq()
: sequence of prime numbers
rabbitseq()
: rabbit sequence
ratsseq(i, p)
: reverse add and then sort sequence
signaseq(r, n, m)
: signature sequence
spectseq(r)
: spectral sequence
srpseq(n, m)
: generate square-root palindrome
versumopseq(i, p, args)
: versum sequence with operator
versumseq(i, j)
: generalized reversed-sum sequence
vishwanathseq(i, j)
: random variation on Fibonacci sequence
zebra(args)
: black and white bands
entry(value, i, j)
farey(magnitude, n, d)
This page produced by UniDoc on 2021/04/15 @ 23:59:54.