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 A242399 #13 Feb 16 2025 08:33:22 %S A242399 0,4,8,12,16,11,24,19,23,36,40,44,48,52,47,33,28,32,72,76,80,57,61,56, %T A242399 69,64,68,108,112,116,120,124,119,132,127,131,144,148,152,156,160,155, %U A242399 141,136,140,99,103,107,84,88,83,96,91,95,216,220,224,228,232 %N A242399 Write n and 3n in ternary representation and add all trits modulo 3. %H A242399 Reinhard Zumkeller, <a href="/A242399/b242399.txt">Table of n, a(n) for n = 0..10000</a> %H A242399 P. Mathonet, M. Rigo, M. Stipulanti and N. Zénaïdi, <a href="https://arxiv.org/abs/2201.06636">On digital sequences associated with Pascal's triangle</a>, arXiv:2201.06636 [math.NT], 2022. %H A242399 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Ternary.html">Ternary.</a> %H A242399 Wikipedia, <a href="http://en.wikipedia.org/wiki/Ternary_numeral_system">Ternary numeral system</a> %H A242399 <a href="/index/Ca#CARRYLESS">Index entries for sequences related to carryless arithmetic</a> %F A242399 a(n) <= 4*n; a(m) = 4*m iff m is a term of A242407. %F A242399 a(n) = A008586(n) - A242400(n). %e A242399 n = 25, 3*n = 75: %e A242399 . A007089(25) = 221 %e A242399 . A007089(75) = 2210 %e A242399 . add trits ---- %e A242399 . modulo 3 2101 = A007089(64), hence a(25) = 64. %o A242399 (Haskell) %o A242399 a242399 n = foldr (\t v -> 3 * v + t) 0 $ %o A242399 map (flip mod 3) $ zipWith (+) ([0] ++ ts) (ts ++ [0]) %o A242399 where ts = a030341_row n %Y A242399 Cf. A004488, A007089, A008586, A030341, A048724, A242400, A242407. %Y A242399 Row / column 4 of A325820. %K A242399 nonn,base %O A242399 0,2 %A A242399 _Reinhard Zumkeller_, May 13 2014