login
Sum of digits of (n written in base 6).
26

%I #51 Sep 08 2022 08:45:00

%S 0,1,2,3,4,5,1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,

%T 9,10,1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,

%U 7,8,9,10,11,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10

%N Sum of digits of (n written in base 6).

%C Also the fixed point of the morphism 0->{0,1,2,3,4,5}, 1->{1,2,3,4,5,6}, 2->{2,3,4,5,6,7}, etc. - _Robert G. Wilson v_, Jul 27 2006

%C Sum of six consecutive terms is (15,21,27,33,39,45; 21,27,33,39,45,51; 27,33,39,45,51,57; and so on). - _Vincenzo Librandi_, Aug 02 2010

%H Indranil Ghosh, <a href="/A053827/b053827.txt">Table of n, a(n) for n = 0..10000</a>

%H 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 Robert Walker, <a href="http://robertinventor.com/ftswiki/Self_Similar_Sloth_Canon_Number_Sequences">Self Similar Sloth Canon Number Sequences</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DigitSum.html">Digit Sum</a>.

%F From _Benoit Cloitre_, Dec 19 2002: (Start)

%F a(0) = 0, a(6n+i) = a(n)+i for 0 <= i <= 5.

%F a(n) = n-5*(Sum_{k>0} floor(n/6^k)) = n-5*A054895(n). (End)

%F a(n) = A138530(n,6) for n > 5. - _Reinhard Zumkeller_, Mar 26 2008

%F a(n) = Sum_{k>=0} A030567(n,k). - _Philippe Deléham_, Oct 21 2011

%F a(0) = 0; a(n) = a(n - 6^floor(log_6(n))) + 1. - _Ilya Gutkovskiy_, Aug 23 2019

%F Sum_{n>=1} a(n)/(n*(n+1)) = 6*log(6)/5 (Shallit, 1984). - _Amiram Eldar_, Jun 03 2021

%e a(20)=3+2=5 because 20 is written as 32 base 6.

%e From _Omar E. Pol_, Feb 21 2010: (Start)

%e It appears that this can be written as a triangle :

%e 0,

%e 1,2,3,4,5,

%e 1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,

%e 1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,2...

%e where the rows converge to A173526.

%e See the conjecture in the entry A000120. (End)

%t Table[Plus @@ IntegerDigits[n, 6], {n, 0, 100}] (* or *)

%t Nest[ Flatten[ #1 /. a_Integer -> Table[a + i, {i, 0, 5}]] &, {0}, 4] (* _Robert G. Wilson v_, Jul 27 2006 *)

%o (PARI) a(n)=if(n<1,0,if(n%6,a(n-1)+1,a(n/6)))

%o (PARI) a(n) = sumdigits(n, 6); \\ _Michel Marcus_, Aug 24 2019

%o (Magma) [&+Intseq(n,6):n in [0..105]]; // _Marius A. Burtea_, Aug 24 2019

%Y Cf. A231672, A231673, A231674, A231675, A138530.

%Y Sum of digits of n written in bases 2-16: A000120, A053735, A053737, A053824, this sequence, A053828, A053829, A053830, A007953, A053831, A053832, A053833, A053834, A053835, A053836.

%Y Cf. A173526. - _Omar E. Pol_, Feb 21 2010

%K base,nonn

%O 0,3

%A _Henry Bottomley_, Mar 28 2000