Learn R Programming

FunWithNumbers (version 1.2)

Fun with Fractions and Number Sequences

Description

A collection of toys to do things like generate Collatz and other interesting sequences, calculate a fraction which is a close approximation to some value (e.g., 22/7 or 355/113 for pi), and so on.

Copy Link

Version

Install

install.packages('FunWithNumbers')

Monthly Downloads

204

Version

1.2

License

LGPL-3

Maintainer

Carl Witthoft

Last Published

April 7th, 2024

Functions in FunWithNumbers (1.2)

morris

Generate the Morris sequence
bpp

Function which calculates pi, or other irrationals, using the BaileyBorweinPlouffe formula ~~
FunWithNumbers-package

tools:::Rd_package_title("FunWithNumbers")
bestFrac

Generate a fraction close to the input value.
factorion

Find Factorion Numbers. ~~
collatz

Test the Collatz Conjecture. ~~
dontWorry

Test for Happy Numbers ~~
benprob

Generate random numbers based on the Benford distribution
juggatz

Function which calculates the "Juggler" sequence ~~
harshad

Find Harshad Numbers ~~
aliquot

Generate the Aliquot Sequence.
kaprekar

Calculate the Kaprekar Sequence. ~~
vaneck

Generate a sequence 'invented' by Jan Ritsema Van Eck
sptable

Calculate the number of unique values in the cross-table of sums and products for the input set of numbers
pdi

Calculate Perfect Digital Invariant ~~
preciseNumbersAsChar

High-precision values for some common constants, in character strings.