morris: Generate the Morris sequence

View source: R/numseqs.R

morrisR Documentation

Generate the Morris sequence

Description

The Morris sequence, aka "Look-Say," is an old puzzler sequence.

Usage

morris(x, reps)

Arguments

x

Either a starting value from 1 to 9, or a numeric vector containing a Morris sequence previously generated.

reps

Specifies the number of new Morris sequences to generate, starting with the input x

Details

The Morris sequence is built by taking the verbal description of a number sequence and converting every number or named numeral to a number in order. Typically, starting with the integer 1, the spoken description is "One 1," so the next sequence is c(1,1). Read that out loud as "Two ones", so the next sequence is c(2,1) and so on.

Value

A list variable containing all the sequences generated as numeric vectors. ...

Author(s)

Carl Witthoft, carl@witthoft.com


FunWithNumbers documentation built on Aug. 29, 2023, 1:06 a.m.