Journal of Integer Sequences, Vol. 13 (2010), Article 10.4.8

Semihappy Numbers

H. G. Grundman
Department of Mathematics
Bryn Mawr College
Bryn Mawr, PA 19010


We generalize the concept of happy number as follows. Let $ {\mathbf e}= (e_0,e_1,....)$ be a sequence with $ e_0 = 2$ and $ e_i = \{1,2\}$ for $ i > 0$. Define $ S_{{\mbox{\scriptsize $\mathbf e$}}}:{{\mathbb{Z}}}^+ \rightarrow {{\mathbb{Z}}}^+$ by

$\displaystyle S_{{\mbox{\scriptsize$\mathbf e$}}}\left(\sum_{i=0}^n a_i 10^i \right) = \sum_{i=0}^n a_i^{e_i}.$

If $ S_{{\mbox{\scriptsize $\mathbf e$}}}^k(a) = 1$ for some $ k \in {{\mathbb{Z}}}^+$, then we say that $ a$ is a semihappy number or, more precisely, an $ {\mathbf e}$-semihappy number. In this paper, we determine fixed points and cycles of the functions $ S_{{\mbox{\scriptsize $\mathbf e$}}}$ and discuss heights of semihappy numbers. We also prove that for each choice of $ {\mathbf e}$, there exist arbitrarily long finite sequences of consecutive $ {\mathbf e}$-semihappy numbers.

Full version:  pdf,    dvi,    ps,    latex    

(Concerned with sequence A007770.)

Received April 7 2010; revised version received April 12 2010. Published in Journal of Integer Sequences, April 15 2010.

Return to Journal of Integer Sequences home page