cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A362896 #25 May 17 2023 20:45:19
%S A362896 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,
%T A362896 16,15,14,18,15,6,14,13,19,18,13,15,12,14,16,15,10,9,13,12,18,17,12,
%U A362896 11,15,14,22,21,16,22,21,25,24,21,20,11,10,18,17,14,13,8,7
%N 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.
%C A362896 "-" signs on negative values are ignored when determining the n-th digit.
%H A362896 Gavin Lupo, <a href="/A362896/b362896.txt">Table of n, a(n) for n = 0..10000</a>
%e A362896 a(0) =  2.
%e A362896 a(1) =  4. 1st digit is 2, which is even. 2 + 2 = 4.
%e A362896 a(2) =  8. 2nd digit is 4, which is even. 4 + 4 = 8.
%e A362896 a(3) = 16. 3rd digit is 8, which is even. 8 + 8 = 16.
%e A362896 a(4) = 15. 4th digit is 1, which is odd.  16 - 1 = 15.
%e A362896 a(5) = 21. 5th digit is 6, which is even. 15 + 6 = 21.
%o A362896 (Python)
%o A362896 a = [2]
%o A362896 split = []
%o A362896 for i in range(100):
%o A362896     split += [int(j) for j in str(abs(a[i]))]
%o A362896     if split[i] % 2 == 0:
%o A362896         a.append((a[i] + split[i]))
%o A362896     else:
%o A362896         a.append((a[i] - split[i]))
%o A362896 print(a)
%Y A362896 Cf. A362371, A362551.
%K A362896 sign,easy,base
%O A362896 0,1
%A A362896 _Gavin Lupo_, May 09 2023