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 A053829 #51 Feb 16 2025 08:32:42 %S A053829 0,1,2,3,4,5,6,7,1,2,3,4,5,6,7,8,2,3,4,5,6,7,8,9,3,4,5,6,7,8,9,10,4,5, %T A053829 6,7,8,9,10,11,5,6,7,8,9,10,11,12,6,7,8,9,10,11,12,13,7,8,9,10,11,12, %U A053829 13,14,1,2,3,4,5,6,7,8,2,3,4,5,6,7,8,9,3,4,5,6,7,8,9,10,4,5,6,7,8,9,10 %N A053829 Sum of digits of (n written in base 8). %C A053829 Also the fixed point of the morphism 0->{0,1,2,3,4,5,6,7}, 1->{1,2,3,4,5,6,7,8}, 2->{2,3,4,5,6,7,8,9}, etc. - _Robert G. Wilson v_, Jul 27 2006 %H A053829 Reinhard Zumkeller, <a href="/A053829/b053829.txt">Table of n, a(n) for n = 0..10000</a> %H A053829 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 A053829 Robert Walker, <a href="http://robertinventor.com/ftswiki/Self_Similar_Sloth_Canon_Number_Sequences">Self Similar Sloth Canon Number Sequences</a> %H A053829 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DigitSum.html">Digit Sum</a>. %H A053829 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Octal.html">Octal</a>. %F A053829 From _Benoit Cloitre_, Dec 19 2002: (Start) %F A053829 a(0) = 0, a(8n+i) = a(n)+i for 0 <= i <= 7. %F A053829 a(n) = n-7*(Sum_{k>0} floor(n/8^k)) = n-7*A054897(n). (End) %F A053829 a(n) = A138530(n,8) for n > 7. - _Reinhard Zumkeller_, Mar 26 2008 %F A053829 a(n) = Sum_k>=0 {A031045(n,k)}. - _Philippe Deléham_, Oct 21 2011 %F A053829 a(0) = 0; a(n) = a(n - 8^floor(log_8(n))) + 1. - _Ilya Gutkovskiy_, Aug 24 2019 %F A053829 Sum_{n>=1} a(n)/(n*(n+1)) = 8*log(8)/7 (Shallit, 1984). - _Amiram Eldar_, Jun 03 2021 %e A053829 a(20)=2+4=6 because 20 is written as 24 base 8. %e A053829 From _Omar E. Pol_, Feb 21 2010: (Start) %e A053829 It appears that this can be written as a triangle (See the conjecture in the entry A000120): %e A053829 0, %e A053829 1,2,3,4,5,6,7, %e A053829 1,2,3,4,5,6,7,8,2,3,4,5,6,7,8,9,3,4,5,6,7,8,9,10,4,5,6,7,8,9,10,11,5,6,7,8,9,10,11,12,6,7,8,9,10,11,12,13,7,8,9,10,11,12,13,14, %e A053829 1,2,3,4,5,6,7,8,2,3,4,5,6,7,8,9,3,4,5,6,7,8,9,10,4,5,6,7,8,9,10... %e A053829 where the rows converge to A173528. (End) %t A053829 Table[Plus @@ IntegerDigits[n, 8], {n, 0, 95}] (* or *) %t A053829 Nest[ Flatten[ #1 /. a_Integer -> Table[a + i, {i, 0, 7}]] &, {0}, 4] (* _Robert G. Wilson v_, Jul 27 2006 *) %o A053829 (PARI) a(n)=if(n<1,0,if(n%8,a(n-1)+1,a(n/8))) %o A053829 (PARI) a(n) = sumdigits(n, 8); \\ _Michel Marcus_, Jul 10 2022 %o A053829 (Haskell) %o A053829 a053829 n = q 0 $ divMod n 8 where %o A053829 q r (0, d) = r + d %o A053829 q r (m, d) = q (r + d) $ divMod m 8 %o A053829 -- _Reinhard Zumkeller_, May 15 2011 %o A053829 (Python) %o A053829 def A053829(n): return sum(int(d) for d in oct(n)[2:]) # _Chai Wah Wu_, Jul 09 2022 %Y A053829 Cf. A000120, A007953, A231680, A231681, A231682, A231683. %Y A053829 Cf. A173528. - _Omar E. Pol_, Feb 21 2010 %K A053829 base,nonn %O A053829 0,3 %A A053829 _Henry Bottomley_, Mar 28 2000