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 A038555 #23 Nov 01 2024 15:07:51 %S A038555 0,0,0,1,2,0,2,0,1,3,4,5,7,8,6,2,0,1,6,7,8,1,2,0,5,3,4,9,10,11,13,14, %T A038555 12,17,15,16,21,22,23,25,26,24,20,18,19,6,7,8,1,2,0,5,3,4,18,19,20,22, %U A038555 23,21,26,24,25,3,4,5,7,8,6,2,0,1,15,16,17,10,11,9,14,12,13,27,28,29 %N A038555 Derivative of n in base 3. %H A038555 Reinhard Zumkeller, <a href="/A038555/b038555.txt">Table of n, a(n) for n = 0..10000</a> %F A038555 Write n in ternary, replace each pair of adjacent digits by their modulo 3 sum. %e A038555 15 = 120 in ternary, derivative is 02 = 2, so a(15)=2. %t A038555 Table[FromDigits[Mod[Total[#],3]&/@Partition[IntegerDigits[n,3],2,1],3],{n,0,100}] (* _Harvey P. Dale_, Nov 01 2024 *) %o A038555 (Haskell) %o A038555 a038555 n = foldr (\d v -> v * 3 + d) 0 $ %o A038555 zipWith (\x y -> (x + y) `mod` 3) ts $ tail ts %o A038555 where ts = a030341_row n %o A038555 -- _Reinhard Zumkeller_, May 26 2013 %o A038555 (J) ab3 =: 3&#.^:_1 %o A038555 sp =: 2&(+/\)"1 %o A038555 > (3 | sp)&.ab3&.> ;/ i. 100 NB. _Stephen Makdisi_, May 26 2018 %Y A038555 Cf. A038554. %Y A038555 Cf. A030341. %K A038555 nonn,nice,easy,base %O A038555 0,5 %A A038555 _N. J. A. Sloane_ %E A038555 More terms from _Erich Friedman_ %E A038555 Formula corrected by _Reinhard Zumkeller_, May 26 2013