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.

A053824 Sum of digits of (n written in base 5).

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 10, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 10, 7, 8, 9, 10, 11, 4, 5, 6
Offset: 0

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

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

Examples

			a(20) = 4 + 0 = 4 because 20 is written as 40 in base 5.
From _Omar E. Pol_, Feb 21 2010: (Start)
It appears that this can be written as a triangle:
  0,
  1,2,3,4,
  1,2,3,4,5,2,3,4,5,6,3,4,5,6,7,4,5,6,7,8,
  1,2,3,4,5,2,3,4,5,6,3,4,5,6,7,4,5,6,7,8,5,6,7,8,9,2,3,4,5,6,3,4,5,6,7,4,5,...
See the conjecture in the entry A000120. (End)
		

Crossrefs

Sum of digits of n written in bases 2-16: A000120, A053735, A053737, this sequence, A053827, A053828, A053829, A053830, A007953, A053831, A053832, A053833, A053834, A053835, A053836.
Cf. A173525. - Omar E. Pol, Feb 21 2010
Cf. A173670 (last nonzero decimal digit of (10^n)!). - Washington Bomfim, Jan 01 2011

Programs

  • Haskell
    a053824 0 = 0
    a053824 x = a053824 x' + d  where (x', d) = divMod x 5
    -- Reinhard Zumkeller, Jan 31 2014
    
  • Magma
    [&+Intseq(n, 5):n in [0..100]]; // Marius A. Burtea, Aug 24 2019
  • Mathematica
    Table[Plus @@ IntegerDigits[n, 5], {n, 0, 100}] (* or *)
    Nest[Flatten[ #1 /. a_Integer -> Table[a + i, {i, 0, 4}]] &, {0}, 4] (* Robert G. Wilson v, Jul 27 2006 *)
    f[n_] := n - 4 Sum[Floor[n/5^k], {k, n}]; Array[f, 103, 0]
  • PARI
    a(n)=if(n<1,0,if(n%5,a(n-1)+1,a(n/5)))
    
  • PARI
    a(n) = sumdigits(n, 5); \\ Michel Marcus, Aug 24 2019
    

Formula

From Benoit Cloitre, Dec 19 2002: (Start)
a(0) = 0, a(5n+i) = a(n) + i for 0 <= i <= 4;
a(n) = n - 4*Sum_{k>=1} floor(n/5^k) = n - 4*A027868(n). (End)
a(n) = A138530(n,5) for n > 4. - Reinhard Zumkeller, Mar 26 2008
If i >= 2, a(2^i) mod 4 = 0. - Washington Bomfim, Jan 01 2011
a(n) = Sum_{k>=0} A031235(n,k). - Philippe Deléham, Oct 21 2011
a(0) = 0; a(n) = a(n - 5^floor(log_5(n))) + 1. - Ilya Gutkovskiy, Aug 23 2019
Sum_{n>=1} a(n)/(n*(n+1)) = 5*log(5)/4 (Shallit, 1984). - Amiram Eldar, Jun 03 2021

A231668 a(n) = Sum_{i=0..n} digsum_5(i), where digsum_5(i) = A053824(i).

Original entry on oeis.org

0, 1, 3, 6, 10, 11, 13, 16, 20, 25, 27, 30, 34, 39, 45, 48, 52, 57, 63, 70, 74, 79, 85, 92, 100, 101, 103, 106, 110, 115, 117, 120, 124, 129, 135, 138, 142, 147, 153, 160, 164, 169, 175, 182, 190, 195, 201, 208, 216, 225, 227, 230, 234, 239, 245, 248, 252, 257, 263, 270, 274, 279, 285, 292, 300, 305, 311, 318, 326, 335, 341, 348, 356, 365, 375, 378, 382, 387, 393, 400
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, 5]; Accumulate @ Array[a, 80, 0] (* Amiram Eldar, Dec 09 2021 *)
  • PARI
    a(n) = sum(i=0, n, sumdigits(i, 5)); \\ Michel Marcus, Sep 20 2017

Formula

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

A231670 a(n) = Sum_{i=0..n} digsum_5(i)^3, where digsum_5(i) = A053824(i).

Original entry on oeis.org

0, 1, 9, 36, 100, 101, 109, 136, 200, 325, 333, 360, 424, 549, 765, 792, 856, 981, 1197, 1540, 1604, 1729, 1945, 2288, 2800, 2801, 2809, 2836, 2900, 3025, 3033, 3060, 3124, 3249, 3465, 3492, 3556, 3681, 3897, 4240, 4304, 4429, 4645, 4988, 5500, 5625, 5841, 6184, 6696, 7425, 7433, 7460, 7524, 7649, 7865, 7892, 7956, 8081, 8297, 8640, 8704, 8829, 9045, 9388, 9900, 10025
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

References

  • Grabner, P. J.; Kirschenhofer, P.; Prodinger, H.; Tichy, R. F.; On the moments of the sum-of-digits function. Applications of Fibonacci numbers, Vol. 5 (St. Andrews, 1992), 263-271, Kluwer Acad. Publ., Dordrecht, 1993.

Crossrefs

Programs

  • Mathematica
    Accumulate[f[n_]:=n - 4 Sum[Floor[n/5^k], {k, n}]; Array[f, 100, 0]^3] (* Vincenzo Librandi, Sep 04 2016 *)

A231671 a(n) = Sum_{i=0..n} digsum_5(i)^4, where digsum_5(i) = A053824(i).

Original entry on oeis.org

0, 1, 17, 98, 354, 355, 371, 452, 708, 1333, 1349, 1430, 1686, 2311, 3607, 3688, 3944, 4569, 5865, 8266, 8522, 9147, 10443, 12844, 16940, 16941, 16957, 17038, 17294, 17919, 17935, 18016, 18272, 18897, 20193, 20274, 20530, 21155, 22451, 24852, 25108, 25733, 27029, 29430, 33526, 34151, 35447, 37848, 41944, 48505, 48521, 48602, 48858, 49483, 50779, 50860, 51116, 51741
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2013

Keywords

References

  • Grabner, P. J.; Kirschenhofer, P.; Prodinger, H.; Tichy, R. F.; On the moments of the sum-of-digits function. Applications of Fibonacci numbers, Vol. 5 (St. Andrews, 1992), 263-271, Kluwer Acad. Publ., Dordrecht, 1993.

Crossrefs

Programs

  • Mathematica
    Accumulate[f[n_]:=n - 4 Sum[Floor[n/5^k], {k, n}]; Array[f, 100, 0]^4] (* Vincenzo Librandi, Sep 04 2016 *)
Showing 1-4 of 4 results.