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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053832 Sum of digits of n written in base 12. 3
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 7, 8 (list; graph; refs; listen; history; internal format)
OFFSET

0,3

COMMENTS

Also the fixed point of the morphism 0->{0,1,2,3,4,5,6,7,8,9,10,11}, 1->{1,2,3,4,5,6,7,8,9,10,11,12}, 2->{2,3,4,5,6,7,8,9,10,11,12,13}, etc. - Robert G. Wilson v Jul 27 2006.

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

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

Eric Weisstein's World of Mathematics, Duodecimal

Eric Weisstein's World of Mathematics, Digit Sum

FORMULA

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

EXAMPLE

a(20)=1+8=9 because 20 is written as 18 base 12

MATHEMATICA

Table[Plus @@ IntegerDigits[n, 12], {n, 0, 85}] (* or *)

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

PROG

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

(Haskell)

a053832 n = q 0 $ divMod n 12 where

   q r (0, d) = r + d

   q r (m, d) = q (r + d) $ divMod m 12

-- Reinhard Zumkeller, May 15 2011

CROSSREFS

Cf. A000120, A007953.

Sequence in context: A131232 A010881 A190600 * A056961 A043271 A062759

Adjacent sequences:  A053829 A053830 A053831 * A053833 A053834 A053835

KEYWORD

base,nonn

AUTHOR

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 01:56 EST 2012. Contains 205860 sequences.