%I #29 Aug 03 2023 03:44:34
%S 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,1,2,3,4,5,6,7,8,9,10,11,12,13,14,
%T 15,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,3,4,5,6,7,8,9,10,11,12,13,14,
%U 15,16,17,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,5,6,7,8,9,10,11,12,13
%N Sum of digits of n written in base 15.
%H Tanar Ulric, <a href="/A053835/b053835.txt">Table of n, a(n) for n = 0..10000</a>
%H Jeffrey O. Shallit, <a href="http://www.jstor.org/stable/2322179">Problem 6450</a>, Advanced Problems, The American Mathematical Monthly, Vol. 91, No. 1 (1984), pp. 59-60; <a href="http://www.jstor.org/stable/2322523">Two series, solution to Problem 6450</a>, ibid., Vol. 92, No. 7 (1985), pp. 513-514.
%H Robert Walker, <a href="https://web.archive.org/web/20190411111921/http://robertinventor.com/ftswiki/Self_Similar_Sloth_Canon_Number_Sequences">Self Similar Sloth Canon Number Sequences</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DigitSum.html">Digit Sum</a>.
%F From _Benoit Cloitre_, Dec 19 2002: (Start)
%F a(0) = 0, a(15n+i) = a(n)+i, 0<=i<=14.
%F a(n) = n - 14*(Sum_{k>0} floor(n/15^k)). (End)
%F a(n) = A138530(n,15) for n > 14. - _Reinhard Zumkeller_, Mar 26 2008
%F Sum_{n>=1} a(n)/(n*(n+1)) = 15*log(15)/14 (Shallit, 1984). - _Amiram Eldar_, Aug 03 2023
%e a(20) = 1 + 5 = 6 because 20 is written as "15" in base 15.
%t a[n_] := Total[IntegerDigits[n, 15]]; Array[a, 100, 0] (* _Amiram Eldar_, Aug 03 2023 *)
%o (PARI) a(n)=if(n<1,0,if(n%15,a(n-1)+1,a(n/15)))
%Y Cf. A000120, A007953, A138530.
%K base,nonn
%O 0,3
%A _Henry Bottomley_, Mar 28 2000