[go: up one dir, main page]

login
A053833
Sum of digits of n written in base 13.
9
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 6, 7, 8, 9, 10, 11, 12
OFFSET
0,3
LINKS
Jeffrey O. Shallit, Problem 6450, Advanced Problems, The American Mathematical Monthly, Vol. 91, No. 1 (1984), pp. 59-60; Two series, solution to Problem 6450, ibid., Vol. 92, No. 7 (1985), pp. 513-514.
Eric Weisstein's World of Mathematics, Digit Sum.
FORMULA
From Benoit Cloitre, Dec 19 2002: (Start)
a(0) = 0, a(13n+i) = a(n)+i for 0 <= i <= 12.
a(n) = n-12*(Sum_{k>0} floor(n/13^k)). (End)
a(n) = A138530(n,13) for n > 12. - Reinhard Zumkeller, Mar 26 2008
Sum_{n>=1} a(n)/(n*(n+1)) = 13*log(13)/12 (Shallit, 1984). - Amiram Eldar, Jun 03 2021
EXAMPLE
a(20) = 1 + 7 = 8 because 20 is written as "17" in base 13.
MATHEMATICA
Total[IntegerDigits[#, 13]]&/@Range[0, 90] (* Harvey P. Dale, Jul 17 2012 *)
PROG
(PARI) a(n)=if(n<1, 0, if(n%13, a(n-1)+1, a(n/13)))
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Henry Bottomley, Mar 28 2000
STATUS
approved