Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A053735
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A053735 Sum of digits of (n written in base 3). +0
21
0, 1, 2, 1, 2, 3, 2, 3, 4, 1, 2, 3, 2, 3, 4, 3, 4, 5, 2, 3, 4, 3, 4, 5, 4, 5, 6, 1, 2, 3, 2, 3, 4, 3, 4, 5, 2, 3, 4, 3, 4, 5, 4, 5, 6, 3, 4, 5, 4, 5, 6, 5, 6, 7, 2, 3, 4, 3, 4, 5, 4, 5, 6, 3, 4, 5, 4, 5, 6, 5, 6, 7, 4, 5, 6, 5, 6, 7, 6, 7, 8, 1, 2, 3, 2, 3, 4, 3, 4, 5, 2, 3, 4, 3, 4, 5, 4, 5, 6, 3, 4, 5, 4, 5, 6 (list; graph; listen)
OFFSET

0,3

COMMENT

Also the fixed point of the morphism 0->{0,1,2}, 1->{1,2,3}, 2->{2,3,4}, etc. - Robert G. Wilson v Jul 27 2006.

a(A062318(n)) = n and a(m) < n for m < A062318(n). - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Feb 26 2008

a(n) = A138530(n,3) for n > 2. - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Mar 26 2008

LINKS

T. D. Noe, Table of n, a(n) for n = 0..10000

Michael Gilleland, Some Self-Similar Integer Sequences

Eric Weisstein's World of Mathematics, Digit Sum

FORMULA

a(0)=0, a(3n)=a(n), a(3n+1)=a(n)+1, a(3n+2)=a(n)+2. - Benoit Cloitre, Dec 19 2002

a(n) = A062756(n) + 2*A081603(n). - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Mar 23 2003

G.f.: (Sum_{k>=0} (x^(3^k)+2*x^(2*3^k))/(1+x^(3^k)+x^(2*3^k)))/(1-x). - Michael Somos Mar 06 2004, corrected by Franklin T. Adams-Watters, Nov 03 2005

In general, the sum of digits of (n written in base b) has generating function (Sum_{k>=0} (Sum_{0<=i<b} i*x^(i*b^k))/(Sum_{0<=i<b} x^(i*b^k)))/(1-x). - Franklin T. Adams-Watters, Nov 03 2005

First differences of A094345. - Vladeta Jovovic (vladeta(AT)eunet.rs), Nov 08 2005

a(n)=n-2*sum(k>0, floor(n/3^k))=n-2*A054861(n). - Benoit Cloitre, Dec 19, 2002

EXAMPLE

a(20)=2+0+2=4 because 20 is written as 202 base 3

MATHEMATICA

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

Nest[ Flatten[ #1 /. a_Integer -> {a, a+1, a + 2}] &, {0}, 5] (* Robert G. Wilson v Jul 27 2006 *)

PROGRAM

(PARI) a(n)=if(n<1, 0, a(n\3)+n%3) - Michael Somos Mar 06 2004

CROSSREFS

Cf. A000120, A007953, A053737, A065363. See A134451 for iterations.

Cf. A007089.

Sequence in context: A067731 A147844 A130634 this_sequence A033667 A033923 A116939

Adjacent sequences: A053732 A053733 A053734 this_sequence A053736 A053737 A053738

KEYWORD

base,nonn

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), Mar 28 2000

page 1

Search completed in 0.003 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 11 12:57 EST 2009. Contains 170656 sequences.


AT&T Labs Research