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 A053832 #29 Feb 16 2025 08:32:42 %S A053832 0,1,2,3,4,5,6,7,8,9,10,11,1,2,3,4,5,6,7,8,9,10,11,12,2,3,4,5,6,7,8,9, %T A053832 10,11,12,13,3,4,5,6,7,8,9,10,11,12,13,14,4,5,6,7,8,9,10,11,12,13,14, %U A053832 15,5,6,7,8,9,10,11,12,13,14,15,16,6,7,8,9,10,11,12,13,14,15,16,17,7,8 %N A053832 Sum of digits of n written in base 12. %C A053832 Also the fixed point of the morphism 0->{0,1,2,3,4,5,6,7,8,9,10,11}, 1->{1,2,3,4,5,6,7,8,9,10,11,12}, 2->{2,3,4,5,6,7,8,9,10,11,12,13}, etc. - _Robert G. Wilson v_, Jul 27 2006 %H A053832 Reinhard Zumkeller, <a href="/A053832/b053832.txt">Table of n, a(n) for n = 0..10000</a> %H A053832 Jeffrey O. Shallit, <a href="http://www.jstor.org/stable/2322179">Problem 6450</a>, Advanced Problems, The American Mathematical Monthly, Vol. 91, No. 1 (1984), pp. 59-60; <a href="http://www.jstor.org/stable/2322523">Two series, solution to Problem 6450</a>, ibid., Vol. 92, No. 7 (1985), pp. 513-514. %H A053832 Robert Walker, <a href="http://robertinventor.com/ftswiki/Self_Similar_Sloth_Canon_Number_Sequences">Self Similar Sloth Canon Number Sequences</a>. %H A053832 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Duodecimal.html">Duodecimal</a>. %H A053832 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DigitSum.html">Digit Sum</a>. %F A053832 From _Benoit Cloitre_, Dec 19 2002: (Start) %F A053832 a(0) = 0, a(12n+i) = a(n)+i for 0 <= i <= 11. %F A053832 a(n) = n-11*(Sum_{k>0} floor(n/12^k)) = n-11*A064459(n). (End) %F A053832 a(n) = A138530(n,12) for n > 11. - _Reinhard Zumkeller_, Mar 26 2008 %F A053832 Sum_{n>=1} a(n)/(n*(n+1)) = 12*log(12)/11 (Shallit, 1984). - _Amiram Eldar_, Jun 03 2021 %e A053832 a(20) = 1 + 8 = 9 because 20 is written as 18 base 12. %t A053832 Table[Plus @@ IntegerDigits[n, 12], {n, 0, 85}] (* or *) %t A053832 Nest[ Flatten[ #1 /. a_Integer -> Table[a + i, {i, 0, 11}]] &, {0}, 2] (* _Robert G. Wilson v_, Jul 27 2006 *) %o A053832 (PARI) a(n)=if(n<1,0,if(n%12,a(n-1)+1,a(n/12))) %o A053832 (Haskell) %o A053832 a053832 n = q 0 $ divMod n 12 where %o A053832 q r (0, d) = r + d %o A053832 q r (m, d) = q (r + d) $ divMod m 12 %o A053832 -- _Reinhard Zumkeller_, May 15 2011 %Y A053832 Cf. A000120, A007953, A064459, A138530. %K A053832 base,nonn %O A053832 0,3 %A A053832 _Henry Bottomley_, Mar 28 2000