login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053830 Sum of digits of (n written in base 9). 18

%I

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

%T 10,11,4,5,6,7,8,9,10,11,12,5,6,7,8,9,10,11,12,13,6,7,8,9,10,11,12,13,

%U 14,7,8,9,10,11,12,13,14,15,8,9,10,11,12,13,14,15,16,1,2,3,4,5,6,7,8,9

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

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

%C a(n) = A138530(n,9) for n > 8. - _Reinhard Zumkeller_, Mar 26 2008

%H Indranil Ghosh, <a href="/A053830/b053830.txt">Table of n, a(n) for n = 0..59049</a>

%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(9n+i) = a(n) + i, 0 <= i <= 8;

%F a(n) = n - 8*Sum_{k>=1} floor(n/9^k) = n - 8*A054898(n). (End)

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

%F a(0) = 0; a(n) = a(n - 9^floor(log_9(n))) + 1. - _Ilya Gutkovskiy_, Aug 24 2019

%e a(20) = 2+2 = 4 because 20 is written as 22 base 9.

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

%e It appears that this can be written as a triangle (see the conjecture in the entry A000120):

%e 0;

%e 1,2,3,4,5,6,7,8;

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

%e where the rows converge to A173529. (End)

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

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

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

%o (MAGMA) [&+Intseq(n, 9):n in [0..100]]; // _Marius A. Burtea_, Aug 24 2019

%Y Cf. A000120, A007953, A053735, A053737, A053824, A053828, A231684-A231687.

%Y Cf. A173529. - _Omar E. Pol_, Feb 23 2010

%K base,nonn

%O 0,3

%A _Henry Bottomley_, Mar 28 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 22 08:00 EDT 2019. Contains 328315 sequences. (Running on oeis4.)