NAME

recaman - generate Recamán's sequence in various formats

USAGE

recaman [n]

Will generate the first n numbers of the sequence. The default is the first 71 numbers.

recaman --help
recaman --man

Will print out help messages.

You can also change the mode to output in different styles.

recaman --mode check
recaman --mode nl 100
recaman --mode nth 1000
recaman --mode max 10000000

And use flags to set various options

recaman --mode svg --flags "first-color=#0000ff second-color=gold stroke-width=10 stride=20 color-mode=gradient" 75

OPTIONS

--help =item --man

Print out help and usage.

--mode | -m

Choose the output mode (see "MODES" below).

--output | -o

Output file for MIDI and SVG modes.

--flags | -f

Optional flags for different modes (see "FLAGS" below).

--alt | -a

Whether to use the standard Recamán's sequence or the alternative A008336 version.

MODES

default

Prints out the requested numbers in the sequence on one line separated by commas.

check

Prints out the first 71 numbers in the sequence plus, immediately, underneath, the same 71 numbers from a different source.

newline or nl

Prints out the requested numbers separate by newlines. This prints each number out as it calculates it so it uses less memory for large sequences.

nth

Prints out only the nth number.

max

Prints out the largest number seen when calculating the nth number.

FLAGS

SVG mode

stride

Distance between numbers n the number line.

Default is 15.

first-color

The first color to use.

Default is black.

second-color

The second color to use. Can be any HTML style hex color (e.g #ffd700) or one of the standard SVG named colors.

Default is blue.

color-mode

If color-mode is set to gradient then the colors of the arcs will gradually fade from first-color to second-color.

Default is choice which switch between first-color to second-color.

stroke-width

The width of the lines of arcs.

Default is 3.

side-choice

Which side to draw arcs on.

Default is mod which alternates between top and bottom.

If you choose backwards then it will draw arcs going backwards under the number line and those going forwards on top.

arc-style

How to draw the arcs.

Default is semicircle which draws, err, a semi-circle.

You can also choose streamlined which draws a sleeker, lower profile arc. This was the default in v1.0.

MIDI mode

tempo

Default is 96.

120 is also interesting and matches what OEIS-to-Midi does.

See https://github.com/synchronometry/OEIS-to-MIDI and https://oeis.org/play?seq=A005132.

AUTHOR

Simon Wistow <simon@thegestalt.org>

COPYRIGHT

Copyright (C) Simon Wistow, 2024