login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A053834
Sum of digits of n written in base 14.
9
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
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(14n+i) = a(n)+i for 0 <= i <= 13.
a(n) = n-13*(Sum_{k>0} floor(n/14^k)). (End)
a(n) = A138530(n,14) for n > 13. - Reinhard Zumkeller, Mar 26 2008
Sum_{n>=1} a(n)/(n*(n+1)) = 14*log(14)/13 (Shallit, 1984). - Amiram Eldar, Jun 03 2021
EXAMPLE
a(20) = 1 + 6 = 7 because 20 is written as "16" in base 14.
MATHEMATICA
Array[Total[IntegerDigits[#, 14]]&, 90, 0] (* Harvey P. Dale, Jul 16 2011 *)
PROG
(PARI) a(n)=if(n<1, 0, if(n%14, a(n-1)+1, a(n/14)))
(PARI) a(n) = sumdigits(n, 14); \\ Michel Marcus, Jun 03 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Henry Bottomley, Mar 28 2000
STATUS
approved