cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A053835 Sum of digits of n written in base 15.

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Examples

			a(20) = 1 + 5 = 6 because 20 is written as "15" in base 15.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[IntegerDigits[n, 15]]; Array[a, 100, 0] (* Amiram Eldar, Aug 03 2023 *)
  • PARI
    a(n)=if(n<1,0,if(n%15,a(n-1)+1,a(n/15)))

Formula

From Benoit Cloitre, Dec 19 2002: (Start)
a(0) = 0, a(15n+i) = a(n)+i, 0<=i<=14.
a(n) = n - 14*(Sum_{k>0} floor(n/15^k)). (End)
a(n) = A138530(n,15) for n > 14. - Reinhard Zumkeller, Mar 26 2008
Sum_{n>=1} a(n)/(n*(n+1)) = 15*log(15)/14 (Shallit, 1984). - Amiram Eldar, Aug 03 2023