[seqfan] Re: Colorless integers

Harvey P. Dale hpd1 at nyu.edu
Tue Feb 22 18:53:19 CET 2011


Here is a simple Mathematica program to compute this sequence.  By changing the second term in the second line of the program, you can change the initial seed number.  In most cases, the resulting sequence fairly quickly devolves into a string of zeroes.  If you seed it with 71, however, it produces a sequence that, after the first five initial terms, consists of a repetitive cycle of 108, 99, 117.

nxt[n_]:=Module[{tidn=Total[IntegerDigits[n]]},If[EvenQ[tidn],n+tidn, n-tidn]]
NestList[nxt,71,100]

	Best,

	Harvey
 

-----Original Message-----
From: seqfan-bounces at list.seqfan.eu [mailto:seqfan-bounces at list.seqfan.eu] On Behalf Of Eric Angelini
Sent: Tuesday, February 22, 2011 11:47 AM
To: Sequence Fanatics Discussion list
Subject: [seqfan] Colorless integers

Hello SeqFans,

(I hope this is not old hat)

Let N be an integer
Let S be the sum of N's digits
--> make M=N+S if S is even
--> make M=N-S if S is odd
Iterate.

Example:

71(+8)=79
       79(+16)=95
               95(+14)=109
                       109(+10)=119
                                119(-11)=108
                                         108(-9)=99
                                                 99(+18)=117
                                                         117(-9)=108
Thus 71 enters in the loop 99.117.108.99

(sequitur here:
http://www.cetteadressecomportecinquantesignes.com/Colorless.htm)

Best,
É.


_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the SeqFan mailing list