lychrel.lychrel
A collection of functions to play with Lychrel numbers and other funny mathematical problems
Functions
|
Collatz conjecture sequence |
|
Generalized Fibonacci sequence (aka Lucas sequence) The number F(n) is computed with the following formula: F(n) = p*F(n-1) - q*F(n-2), where p and q are two integers. |
|
Find the first palindrome produced by reverse-and-add routine (including number of iterations needed) |
|
Check whether the input is a possible Lychrel number |
|
Kaprekar's routine |
|
Given a number, this function compute the sequence of digits resulting from reading out loud the number, grouping together multiples of the same digit if any. |