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.

Showing 1-4 of 4 results.

A053830 Sum of digits of (n written in base 9).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 5, 6, 7, 8, 9, 10, 11, 12, 5, 6, 7, 8, 9, 10, 11, 12, 13, 6, 7, 8, 9, 10, 11, 12, 13, 14, 7, 8, 9, 10, 11, 12, 13, 14, 15, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 2, 3, 4, 5, 6, 7, 8, 9
Offset: 0

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

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

Examples

			a(20) = 2+2 = 4 because 20 is written as 22 base 9.
From _Omar E. Pol_, Feb 23 2010: (Start)
It appears that this can be written as a triangle (see the conjecture in the entry A000120):
0;
1,2,3,4,5,6,7,8;
1,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,10,3,4,5,6,7,8,9,10,11,4,5,6,7,8,9,10,11,...
where the rows converge to A173529. (End)
		

Crossrefs

Programs

  • Magma
    [&+Intseq(n, 9):n in [0..100]]; // Marius A. Burtea, Aug 24 2019
  • Mathematica
    Table[Plus @@ IntegerDigits[n, 9], {n, 0, 100}] (* or *)
    Nest[ Flatten[ #1 /. a_Integer -> Table[a + i, {i, 0, 8}]] &, {0}, 3] (* Robert G. Wilson v, Jul 27 2006 *)
  • PARI
    a(n)=if(n<1,0,if(n%9,a(n-1)+1,a(n/9)))
    

Formula

From Benoit Cloitre, Dec 19 2002: (Start)
a(0) = 0, a(9n+i) = a(n) + i for 0 <= i <= 8;
a(n) = n - 8*Sum_{k>=1} floor(n/9^k) = n - 8*A054898(n). (End)
a(n) = A138530(n,9) for n > 8. - Reinhard Zumkeller, Mar 26 2008
a(n) = Sum_{k>=0} A031087(n,k). - Philippe Deléham, Oct 21 2011
a(0) = 0; a(n) = a(n - 9^floor(log_9(n))) + 1. - Ilya Gutkovskiy, Aug 24 2019
Sum_{n>=1} a(n)/(n*(n+1)) = 9*log(9)/8 (Shallit, 1984). - Amiram Eldar, Jun 03 2021

A231684 a(n) = Sum_{i=0..n} digsum_9(i), where digsum_9(i) = A053830(i).

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 36, 37, 39, 42, 46, 51, 57, 64, 72, 81, 83, 86, 90, 95, 101, 108, 116, 125, 135, 138, 142, 147, 153, 160, 168, 177, 187, 198, 202, 207, 213, 220, 228, 237, 247, 258, 270, 275, 281, 288, 296, 305, 315, 326, 338, 351, 357, 364, 372, 381, 391, 402, 414, 427, 441, 448, 456, 465, 475, 486, 498, 511, 525, 540, 548, 557, 567, 578, 590, 603, 617, 632
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic sequences, Cambridge University Press, 2003, p. 94.

Crossrefs

Programs

  • Mathematica
    a[n_] := Plus @@ IntegerDigits[n, 9]; Accumulate @ Array[a, 80, 0] (* Amiram Eldar, Dec 09 2021 *)
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 9)); \\ Michel Marcus, Sep 20 2017

Formula

a(n) ~ 2*n*log(n)/log(3). - Amiram Eldar, Dec 09 2021

A231685 a(n) = Sum_{i=0..n} digsum_9(i)^2, where digsum_9(i) = A053830(i).

Original entry on oeis.org

0, 1, 5, 14, 30, 55, 91, 140, 204, 205, 209, 218, 234, 259, 295, 344, 408, 489, 493, 502, 518, 543, 579, 628, 692, 773, 873, 882, 898, 923, 959, 1008, 1072, 1153, 1253, 1374, 1390, 1415, 1451, 1500, 1564, 1645, 1745, 1866, 2010, 2035, 2071, 2120, 2184, 2265, 2365, 2486, 2630, 2799, 2835, 2884, 2948, 3029, 3129, 3250, 3394, 3563, 3759, 3808, 3872, 3953, 4053, 4174, 4318
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

Comments

Partial sums of ((the total of the digits of i in base 9) squared). - Harvey P. Dale, Nov 26 2013

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[Total[IntegerDigits[n,9]]^2,{n,0,100}]] (* Harvey P. Dale, Nov 26 2013 *)
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 9)^2); \\ Michel Marcus, Sep 20 2017

A231686 a(n) = Sum_{i=0..n} digsum_9(i)^3, where digsum_9(i) = A053830(i).

Original entry on oeis.org

0, 1, 9, 36, 100, 225, 441, 784, 1296, 1297, 1305, 1332, 1396, 1521, 1737, 2080, 2592, 3321, 3329, 3356, 3420, 3545, 3761, 4104, 4616, 5345, 6345, 6372, 6436, 6561, 6777, 7120, 7632, 8361, 9361, 10692, 10756, 10881, 11097, 11440, 11952, 12681, 13681, 15012, 16740, 16865, 17081, 17424, 17936, 18665, 19665, 20996, 22724, 24921, 25137, 25480, 25992, 26721, 27721, 29052
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[Total[IntegerDigits[n,9]]^3,{n,0,60}]] (* Harvey P. Dale, Dec 22 2020 *)
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 9)^3); \\ Michel Marcus, Sep 20 2017
Showing 1-4 of 4 results.