# happy number

Given a base $b$ integer

$$n=\sum _{i=1}^{k}{d}_{i}{b}^{i-1}$$ |

where ${d}_{1}$ is the least significant digit and ${d}_{k}$ is the most significant, and the function

$$f(m)=\sum _{i=1}^{k}d_{i}{}^{2},$$ |

if computing $f(n)$ and iterating that function on the result eventually^{} leads to a fixed point^{} of 1, then $n$ is said to be a happy number in base $b$.

For $b=2$ and $b=4$, all numbers are happy numbers. All standard positional bases have happy numbers.

Title | happy number |
---|---|

Canonical name | HappyNumber |

Date of creation | 2013-03-22 16:19:56 |

Last modified on | 2013-03-22 16:19:56 |

Owner | PrimeFan (13766) |

Last modified by | PrimeFan (13766) |

Numerical id | 4 |

Author | PrimeFan (13766) |

Entry type | Definition |

Classification | msc 11A63 |