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 A004500 #20 Oct 26 2023 08:32:46 %S A004500 11,9,10,14,12,13,17,15,16,20,18,19,23,21,22,26,24,25,2,0,1,5,3,4,8,6, %T A004500 7,38,36,37,41,39,40,44,42,43,47,45,46,50,48,49,53,51,52,29,27,28,32, %U A004500 30,31,35,33,34,65,63,64,68,66,67,71,69,70,74,72,73,77,75 %N A004500 Tersum n + 11. %H A004500 <a href="/index/Rec#order_22">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1,0,0,0,0,-1,1,0,1,-1,0,0,0,0,-1,1,0,1,-1). %F A004500 Tersum m + n: write m and n in base 3 and add mod 3 with no carries; e.g., 5 + 8 = "21" + "22" = "10" = 1. %F A004500 a(n) = A004489(n, 11). - _Michel Marcus_, Nov 09 2021 %F A004500 G.f.: (20*x^21+x^20-2*x^19-16*x^18-7*x^12+x^11-2*x^10+11*x^9-7*x^3+x^2-2*x+11) / ((x^2+x+1)*(x^18+x^9+1)*(x-1)^2). - _Alois P. Heinz_, Nov 09 2021 %o A004500 (Python) %o A004500 def a(n): %o A004500 k, pow3, m = 0, 1, 11 %o A004500 while n + m > 0: %o A004500 n, rn = divmod(n, 3) %o A004500 m, rm = divmod(m, 3) %o A004500 k, pow3 = k + pow3*((rn+rm)%3), pow3*3 %o A004500 return k %o A004500 print([a(n) for n in range(58)]) # _Michael S. Branicky_, Nov 09 2021 %Y A004500 Cf. A004489. %K A004500 nonn,base,easy %O A004500 0,1 %A A004500 _N. J. A. Sloane_