Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

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

0,3

COMMENT

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

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

LINKS

Eric Weisstein's World of Mathematics, Digit Sum

FORMULA

a(0)=0, a(4n+i)=a(n)+i 0<=i<=3; a(n)=n-3*(sum(k>0, floor(n/4^k))=n-3*A054893(n). - Benoit Cloitre, Dec 19, 2002

G.f.: (Sum_{k>=0} (x^(4^k)+2*x^(2*4^k)+3*x^(3*4^k))/(1+x^(4^k)+x^(2*4^k)+x^(3*4^k))/(1-x). - Franklin T. Adams-Watters, Nov 03 2005

EXAMPLE

a(20)=1+1+0=2 because 20 is written as 110 base 4.

MATHEMATICA

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

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

PROGRAM

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

CROSSREFS

Cf. A000120, A007953, A053735.

Adjacent sequences: A053734 A053735 A053736 this_sequence A053738 A053739 A053740

Sequence in context: A007720 A129968 A027615 this_sequence A033924 A003315 A071797

KEYWORD

base,nonn

AUTHOR

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

page 1

Search completed in 0.002 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 November 8 07:45 EST 2009. Contains 166143 sequences.


AT&T Labs Research