The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A362896 a(0)=2. For n>0, let d = n-th digit in the sequence thus far. a(n) = a(n-1) + d if d is even. Otherwise, a(n) = a(n-1) - d. 1
 2, 4, 8, 16, 15, 21, 20, 15, 17, 16, 18, 18, 17, 12, 11, 4, 3, 9, 8, 16, 15, 23, 22, 15, 14, 16, 15, 14, 18, 15, 6, 14, 13, 19, 18, 13, 15, 12, 14, 16, 15, 10, 9, 13, 12, 18, 17, 12, 11, 15, 14, 22, 21, 16, 22, 21, 25, 24, 21, 20, 11, 10, 18, 17, 14, 13, 8, 7 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS "-" signs on negative values are ignored when determining the n-th digit. LINKS Gavin Lupo, Table of n, a(n) for n = 0..10000 EXAMPLE a(0) = 2. a(1) = 4. 1st digit is 2, which is even. 2 + 2 = 4. a(2) = 8. 2nd digit is 4, which is even. 4 + 4 = 8. a(3) = 16. 3rd digit is 8, which is even. 8 + 8 = 16. a(4) = 15. 4th digit is 1, which is odd. 16 - 1 = 15. a(5) = 21. 5th digit is 6, which is even. 15 + 6 = 21. PROG (Python) a = [2] split = [] for i in range(100): split += [int(j) for j in str(abs(a[i]))] if split[i] % 2 == 0: a.append((a[i] + split[i])) else: a.append((a[i] - split[i])) print(a) CROSSREFS Cf. A362371, A362551. Sequence in context: A210023 A301807 A062116 * A316749 A008381 A083780 Adjacent sequences: A362893 A362894 A362895 * A362897 A362898 A362899 KEYWORD sign,easy,base AUTHOR Gavin Lupo, May 09 2023 STATUS approved

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

Last modified December 7 00:23 EST 2023. Contains 367616 sequences. (Running on oeis4.)