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-7 of 7 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

A173523 1+A053735(n-1), where A053735 is the sum-of-digits function in base 3.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 20 2010

Keywords

Comments

A053735 can be obtained as 0 followed by the first 2 terms of this sequence, followed by the first 6 terms, followed by the first 18 terms, ..., followed by the first 2*3^n terms, etc.
Similar observations are possible for: A063787 (base-2 case), and generic comments have been gathered in A173525 (base-5 case).
Fixed point of morphism 1->123, 2->234, 3->345 etc. (start with 1).

Examples

			If written as a triangle, begins:
1,
2,3,
2,3,4,3,4,5,
2,3,4,3,4,5,4,5,6,3,4,5,4,5,6,5,6,7,
2,3,4,3,4,5,4,5,6,3,4,5,4,5,6,5,6,7,4,5,6,5,6,7,6,7,8,...
		

Crossrefs

A173524 a(n) = A053737(4^k+n-1) in the limit k->infinity, where k plays the role of a row index in A053737.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 20 2010

Keywords

Comments

It appears that if A053737 is written as a triangle then the rows are initial segments of the present sequence; see the conjecture in A000120.
The comments in A173525 (base b=5 there) apply here with base b=4. The base b=3 is considered in A173523.

Crossrefs

Programs

  • Maple
    A053737 := proc(n) add(d, d=convert(n,base,4)) ; end proc:
    A173524 := proc(n) local b; b := 4 ; if n < b then n; else k := n/(b-1); k := ceil(log(k)/log(b)) ; A053737(b^k+n-1) ; end if; end proc:
    seq(A173524(n),n=1..100) ; # R. J. Mathar, Dec 09 2010

Formula

a(n) = A053737(4^k+n-1) where k >= ceiling(log_4(n/3)). [R. J. Mathar, Dec 09 2010]
Conjecture: Fixed point of the morphism 1->{1,2,3,...,b}, 2->{2,3,4,...,b+1}, j->{j,j+1,...,j+b-1} for b=4. [Joerg Arndt, Dec 08 2010]

A173528 a(n) = 1 + sum of digits of n-1 written in base 8.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 20 2010

Keywords

Comments

If A053829 is written as a triangle then the rows converge to this sequence; see the conjecture in A000120.
The sequence is the base b=8 case in a family of 8 sequences for base b=2 (A063787) and bases 3 to 9 (A173523 to A173529). Common aspects (recurrences etc.) of these are documented in A173525.

Crossrefs

Programs

  • Magma
    a053829:=func< n | &+Intseq(n, 8) >; a173528:=func< n | a053829(n-1)+1 >; [ a173528(n): n in [1..90] ]; // Klaus Brockhaus, Dec 07 2010
    
  • Sage
    A173528 = lambda n: 1+sum((n-1).digits(base=8)) # D. S. McNeil, Dec 07 2010

Formula

a(n) = A053829(n-1)+1.

Extensions

More terms from Vincenzo Librandi, Feb 21 2010
Definition and formula added by M. F. Hasler, Dec 06 2010

A173529 a(n) = 1 + A053830(n-1), where A053830 is the sum of the digits of its argument in base 9.

Original entry on oeis.org

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, 9, 10, 11, 12, 13, 14, 15, 16, 17, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4
Offset: 1

Views

Author

Omar E. Pol, Feb 23 2010

Keywords

Comments

If A053830 is regarded as a triangle then the rows converge to this sequence.
This is the case b=9 of a non-periodic sequence, with key formulas and definitions provided with b=5 in A173525. Case b=2 is in A063787, and cases b=3 to 8 are in A173523 to A173528.

Crossrefs

Programs

  • Mathematica
    Table[1 + Plus@@IntegerDigits[n - 1, 9], {n, 90}] (* Vincenzo Librandi, Jul 01 2019 *)

Formula

a(n) = A053830(9^k + n - 1) where k >= ceiling(log_9(n/8)). - R. J. Mathar, Dec 09 2010

A173526 a(n) = 1 + A053827(n-1), where A053827 is the sum-of-digits function in base 6.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 20 2010

Keywords

Comments

If A053827 is regarded as a triangle then the rows converge to this sequence, i.e., a(n) = A053827(6^k+n-1) in the limit k->infinity, where k plays the role of a row index in A053827.
See conjecture in the entry A000120.
This sequence is the base b=6 case equivalent to A063787 (b=2), A173523 (b=3), A173524 (b=4), A173525 (b=5). Generic comments concerning the various bases are in A173525.

Crossrefs

Programs

  • Mathematica
    Table[1 + Total[IntegerDigits[n-1, 6]], {n, 1, 110}] (* G. C. Greubel, Jul 02 2019 *)
  • PARI
    A053827(n)= if(n<1, 0, if(n%6, a(n-1)+1, a(n/6)));
    vector(110, n, 1+A053827(n-1)) \\ G. C. Greubel, Jul 02 2019

Formula

a(n) = A053827(6^k+n-1) where k >= ceiling(log_6(n/5)). - R. J. Mathar, Dec 09 2010
Conjecture: Fixed point of the morphism 1->{1,2,3,...,b}, 2->{2,3,4,...,b+1},
j->{j,j+1,...,j+b-1} for b=6. - Joerg Arndt, Dec 08 2010

Extensions

More terms from Vincenzo Librandi, Aug 02 2010

A173527 a(n) = 1 + A053828(n-1), where A053828 is the sum of digits in base 7.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 20 2010

Keywords

Comments

If A053828 is regarded as a triangle then the rows converge to this sequence, i.e., a(n) = A053828(7^k+n-1) in the limit k->infinity, where k plays the role of a row index in A053828.
See conjecture in the entry A000120.
This is the case for base b=7 for the sum of digits. A063787 and A173523 to A173526 deal with the bases 2 to 6. A173525 contains generic remarks concerning these 8 sequences which look in equivalent ways at their sum of digits as a sequence with triangular structure.

Crossrefs

Programs

  • Maple
    A053828 := proc(n) add(d, d=convert(n,base,7)) ; end proc:
    A173527 := proc(n) local b; b := 7 ; if n < b then n; else k := n/(b-1); k := ceil(log(k)/log(b)) ; A053828(b^k+n-1) ; end if; end proc:
    seq(A173527(n),n=1..100) ; # R. J. Mathar, Dec 09 2010
  • Mathematica
    Table[Total[IntegerDigits[n-1,7]]+1,{n,110}] (* Harvey P. Dale, Apr 01 2018 *)

Formula

a(n) = A053828(7^k+n-1) where k >= ceiling(log_7(n/6)). [R. J. Mathar, Dec 09 2010]
Conjecture: Fixed point of the morphism 1->{1,2,3,...b}, 2->{2,3,4...,b+1}, j->{j,j+1,...,j+b-1} for b=7. [Joerg Arndt, Dec 08 2010]

Extensions

More terms from Vincenzo Librandi, Feb 21 2010
Showing 1-7 of 7 results.