[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a173529 -id:a173529
     Sort: relevance | references | number | modified | created      Format: long | short | data
Sum of digits of (n written in base 9).
+10
27
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,3
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
LINKS
Jeffrey O. Shallit, Problem 6450, Advanced Problems, The American Mathematical Monthly, Vol. 91, No. 1 (1984), pp. 59-60; Two series, solution to Problem 6450, ibid., Vol. 92, No. 7 (1985), pp. 513-514.
Eric Weisstein's World of Mathematics, Digit Sum.
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
EXAMPLE
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)
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 *)
PROG
(PARI) a(n)=if(n<1, 0, if(n%9, a(n-1)+1, a(n/9)))
(Magma) [&+Intseq(n, 9):n in [0..100]]; // Marius A. Burtea, Aug 24 2019
KEYWORD
base,nonn
AUTHOR
Henry Bottomley, Mar 28 2000
STATUS
approved
a(n) = 1 + A053824(n-1), where A053824 = sum of digits in base 5.
+10
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, 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 10, 7, 8, 9, 10, 11, 8, 9, 10, 11, 12
OFFSET
1,2
COMMENTS
Also: a(n) = A053824(5^k+n-1) in the limit k->infinity, where k plays the role of a row index in A053824. (See the comment by M. F. Hasler for the proof.)
This means: if A053824 is regarded as a triangle then the rows converge to this sequence.
See conjecture in the entry A000120, and the case of base 2 in A063787.
From R. J. Mathar, Dec 09 2010: (Start)
In base b=5, A053824 starts counting up from 1 each time the index wraps around a power of b: A053824(b^k)=1.
Obvious recurrences are A053824(m*b^k+i) = m+A053824(i), 1 <= m < b-1, 0 <= i < b^(k-1).
So A053824 can be decomposed into a triangle T(k,n) = A053824(b^k+n-1), assuming that column indices start at n=1; row lengths are (b-1)*b^k.
There is a self-similarity in these sequences; a sawtooth structure of periodicity b is added algebraically on top of a sawtooth structure of periodicity b^2, on top of a periodicity b^3 etc. This leads to some "fake" finitely periodic substructures in the early parts of each row of T(.,.): often, but not always, a(n+b)=1+a(n). Often, but not always, a(n+b^2)=1+a(n) etc.
The common part of the rows T(.,.) grows with the power of b as shown in the recurrence above, and defines a(n) in the limit of large row indices k. (End)
The two definitions agree because the first 5^r terms in each row correspond to numbers 5^r, 5^r+1,...,5^r+(5^r-1), which are written in base 5 as a leading 1 plus the digits of 0,...,5^r-1. - M. F. Hasler, Dec 09 2010
From Omar E. Pol, Dec 10 2010: (Start)
In the scatter plots of these sequences, the basic structure is an element with b^2 points, where b is the associated base. (Scatter plots are created with the "graph" button of a sequence.) Sketches of these structures look as follows, the horizontal axis a squeezed version of the index n, b consecutive points packed vertically, and the vertical axis a(n):
........................................................
................................................ * .....
............................................... ** .....
..................................... * ...... *** .....
.................................... ** ..... **** .....
.......................... * ...... *** .... ***** .....
......................... ** ..... **** ... ****** .....
............... * ...... *** .... ***** ... ***** ......
.............. ** ..... **** .... **** .... **** .......
.... * ...... *** ..... *** ..... *** ..... *** ........
... ** ...... ** ...... ** ...... ** ...... ** .........
... * ....... * ....... * ....... * ....... * ..........
........................................................
... b=2 ..... b=3 ..... b=4 ..... b=5 ..... b=6 ........
........................................................
............................................. * ........
............................................ ** ........
........................... * ............. *** ........
.......................... ** ............ **** ........
........... *............ *** ........... ***** ........
.......... ** .......... **** .......... ****** ........
......... ***.......... ***** ......... ******* ........
........ **** ........ ****** ........ ******** ........
....... ***** ....... ******* ....... ********* ........
...... ****** ...... ******** ....... ******** .........
..... ******* ...... ******* ........ ******* ..........
..... ****** ....... ****** ......... ****** ...........
..... ***** ........ ***** .......... ***** ............
..... **** ......... **** ........... **** .............
..... *** .......... *** ............ *** ..............
..... ** ........... ** ............. ** ...............
..... * ............ * .............. * ................
........................................................
..... b=7 .......... b=8 ............ b=9 ..............
... A053828 ...... A053829 ........ A053830 ............
... A173527 ...... A173528 ........ A173529 ............(End)
FORMULA
a(n) = A053824(5^k + n - 1) where k >= ceiling(log_5(n/4)). - R. J. Mathar, Dec 09 2010
MAPLE
A053825 := proc(n) add(d, d=convert(n, base, 5)) ; end proc:
A173525 := proc(n) local b, k; b := 5 ; if n < b then n; else k := n/(b-1); k := ceil(log(k)/log(b)) ; A053825(b^k+n-1) ; end if; end proc:
seq(A173525(n), n=1..100) ;
MATHEMATICA
Total[IntegerDigits[#, 5]]+1&/@Range[0, 100] (* Harvey P. Dale, Jun 14 2015 *)
PROG
(PARI) A173525(n)={ my(s=1); n--; until(!n\=5, s+=n%5); s } \\ M. F. Hasler, Dec 09 2010
(PARI) A173525(n)={ my(s=1+(n=divrem(n-1, 5))[2]); while((n=divrem(n[1], 5))[1], s+=n[2]); s+n[2] } \\ M. F. Hasler, Dec 09 2010
(Haskell)
a173525 = (+ 1) . a053824 . (subtract 1) -- Reinhard Zumkeller, Jan 31 2014
KEYWORD
nonn,base,look
AUTHOR
Omar E. Pol, Feb 20 2010
EXTENSIONS
More terms from Vincenzo Librandi, Aug 02 2010
STATUS
approved
1+A053735(n-1), where A053735 is the sum-of-digits function in base 3.
+10
7
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,2
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).
EXAMPLE
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
KEYWORD
base,nonn
AUTHOR
Omar E. Pol, Feb 20 2010
STATUS
approved
a(n) = A053737(4^k+n-1) in the limit k->infinity, where k plays the role of a row index in A053737.
+10
7
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,2
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.
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]
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
KEYWORD
nonn
AUTHOR
Omar E. Pol, Feb 20 2010
STATUS
approved
a(n) = 1 + sum of digits of n-1 written in base 8.
+10
7
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,2
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.
FORMULA
a(n) = A053829(n-1)+1.
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Omar E. Pol, Feb 20 2010
EXTENSIONS
More terms from Vincenzo Librandi, Feb 21 2010
Definition and formula added by M. F. Hasler, Dec 06 2010
STATUS
approved
a(n) = 1 + A053827(n-1), where A053827 is the sum-of-digits function in base 6.
+10
6
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,2
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.
LINKS
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
MATHEMATICA
Table[1 + Total[IntegerDigits[n-1, 6]], {n, 1, 110}] (* G. C. Greubel, Jul 02 2019 *)
PROG
(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
KEYWORD
nonn,base
AUTHOR
Omar E. Pol, Feb 20 2010
EXTENSIONS
More terms from Vincenzo Librandi, Aug 02 2010
STATUS
approved
a(n) = 1 + A053828(n-1), where A053828 is the sum of digits in base 7.
+10
6
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,2
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.
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]
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 *)
KEYWORD
nonn,base
AUTHOR
Omar E. Pol, Feb 20 2010
EXTENSIONS
More terms from Vincenzo Librandi, Feb 21 2010
STATUS
approved

Search completed in 0.011 seconds