login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243259 Numbers n such that n appears in the sequence x(i) = x(i-1) +/- digitsum(x(i-1)), where even digitsums are added, odd digitsums are subtracted and x(0) = n. 2
99, 108, 117, 198, 207, 216, 297, 306, 315, 396, 405, 414, 495, 504, 513, 594, 603, 612, 693, 702, 711, 792, 801, 810, 972, 990, 999, 1008, 1098, 1107, 1116, 1197, 1206, 1215, 1296, 1305, 1314, 1395, 1404, 1413, 1494, 1503, 1512, 1593, 1602, 1611, 1692, 1701 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The sequence begins with x(0) = n and continues by adding or subtracting the digitsum. When the digitsum(x(i-1)) is even, x(i) = x(i-1) + digitsum(x(i-1)), otherwise x(i) = x(i-1) - digitsum(x(i-1)).

LINKS

Anthony Sand, Table of n, a(n) for n = 1..1000

FORMULA

x(i) = x(i-1) + digitsum(x(i-1)) * (1 - (digitsum(x(i-1)) mod 2) * 2).

EXAMPLE

digitsum(99) = 18, 18 is even, so 99 + 18 = 117. digitsum(117) = 9, 9 is odd, so 177 - 9 = 108. 108 - 9 = 99, hence 99 belongs to sequence.

108 - 9 = 99, 99 + 18 = 117, 117 - 9 = 108, hence 108 is in the sequence.

117 - 9 = 108. 108 - 9 = 99. 99 + 18 = 117.

198 + 18 = 216. 216 - 9 = 207. 207 - 9 = 198.

CROSSREFS

Cf. A004207, A243260.

Sequence in context: A213157 A317592 A296881 * A171904 A171903 A072433

Adjacent sequences:  A243256 A243257 A243258 * A243260 A243261 A243262

KEYWORD

nonn,base

AUTHOR

Anthony Sand, Jun 02 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 6 18:42 EDT 2020. Contains 333286 sequences. (Running on oeis4.)