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.
%I A330401 #14 Dec 16 2019 02:19:06 %S A330401 1,2,3,4,5,6,8,7,18,11,9,20,13,24,22,10,21,14,25,26,15,16,27,28,17,19, %T A330401 30,29,40,33,44,46,35,36,47,48,37,38,49,50,39,41,52,51,62,45,12,32,43, %U A330401 23,34,54,60,31,61,71,81,63,53,42,55,57,68,66,72,70,79 %N A330401 Lexicographically earliest sequence of distinct positive terms with an associate sequence t such that t(0) = 0, and for any n > 0, at least one of t(n-1) - a(n) or t(n-1) + a(n) is a palindrome; in case t(n-1) - a(n) is a palindrome, set t(n) = t(n-1) - a(n), otherwise set t(n) = t(n-1) + a(n). %C A330401 This sequence is a variant of A329544. %H A330401 Rémy Sigrist, <a href="/A330401/b330401.txt">Table of n, a(n) for n = 1..10000</a> %H A330401 Rémy Sigrist, <a href="/A330401/a330401_1.gp.txt">PARI program for A330401</a> %e A330401 The first terms, alongside t(n), are: %e A330401 n a(n) t(n) %e A330401 -- ---- ---- %e A330401 0 N/A 0 %e A330401 1 1 1 %e A330401 2 2 3 %e A330401 3 3 0 %e A330401 4 4 4 %e A330401 5 5 9 %e A330401 6 6 3 %e A330401 7 8 11 %e A330401 8 7 4 %e A330401 9 18 22 %e A330401 10 11 11 %e A330401 11 9 2 %e A330401 12 20 22 %o A330401 (PARI) See Links section. %Y A330401 See A330402 and A330403 for similar sequences. %Y A330401 Cf. A002113, A329544, A330420 (running totals). %K A330401 nonn,base %O A330401 1,2 %A A330401 _Rémy Sigrist_, Dec 13 2019