login
This site is supported by donations to The OEIS Foundation.

 

Logo

Invitation: celebrating 50 years of OEIS, 250000 sequences, and Sloane's 75th, there will be a conference at DIMACS, Rutgers, Oct 9-10 2014.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007953 Digital sum (i.e., sum of digits) of n; also called digsum(n). 577
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 8, 9, 10, 11, 12, 13, 14, 15 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Do not confuse with the digital root of n, A010888 (first term that differs is a(19)).

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

For n < 100 equal to (floor(n/10) + n mod 10) = A076314(n). - Hieronymus Fischer, Jun 17 2007

a(n) = A138530(n, 10) for n > 9. - Reinhard Zumkeller, Mar 26 2008

a(A058369(n)) = A004159(A058369(n)); a(A000290(n)) = A004159(n). - Reinhard Zumkeller, Apr 25 2009

a(n) mod 2 = A179081(n). - Reinhard Zumkeller, Jun 28 2010

REFERENCES

Krassimir Atanassov, On the 16-th Smarandache Problem, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 1, 36-38.

LINKS

N. J. A. Sloane, Table of n, a(n) for n = 0..10000

Krassimir Atanassov, On Some of Smarandache's Problems

Jean-Luc Baril, Classical sequences revisited with permutations avoiding dotted pattern, Electronic Journal of Combinatorics, 18 (2011), #P178.

A. O. Gel'fond, Sur les nombres qui ont des propriétés additives et multiplicatives données (French) Acta Arith. 13 1967/1968 259--265. MR0220693 (36 #3745)

Christian Mauduit & Andràs Sárközy, On the arithmetic structure of sets characterized by sum of digits properties J. Number Theory 61(1996), no. 1, 25--38. MR1418316 (97g:11107)

Christian Mauduit & Andràs Sárközy, On the arithmetic structure of the integers whose sum of digits is fixed, Acta Arith. 81 (1997), no. 2, 145--173. MR1456239 (99a:11096)

Kerry Mitchell, Spirolateral-Type Images from Integer Sequences, 2013

Kerry Mitchell, Spirolateral image for this sequence [taken, with permission, from the Spirolateral-Type Images from Integer Sequences article]

Jan-Christoph Puchta, Jürgen Spilker, Altes und Neues zur Quersumme, Math. Semesterber, 49 (2002), 209-226.

J.-C. Puchta, J. Spilker, Altes und Neues zur Quersumme

Vladimir Shevelev, Compact integers and factorials, Acta Arith. 126 (2007), no.3,195-236 (cf. pp.205-206).

Robert Walker, Self Similar Sloth Canon Number Sequences

Eric Weisstein's World of Mathematics, Digit Sum

Wikipedia, Digit sum

Index entries for Colombian or self numbers and related sequences

FORMULA

a(n) <= 9(log_10(n)+1). - Stefan Steinerberger, Mar 24 2006

a(0) = 0, a(10n+i) = a(n) + i 0 <= i <= 9; a(n) = n - 9*(sum(k > 0,  floor(n/10^k)) = n - 9*A054899(n). - Benoit Cloitre, Dec 19 2002

From Hieronymus Fischer, Jun 17 2007: (Start)

G.f. g(x) = sum{k > 0, (x^k-x^(k+10^k)-9x^(10^k))/(1-x^(10^k))}/(1-x).

a(n) = n - 9*sum{10 <= k <= n, sum{j|k, j >= 10, floor(log_10(j))-floor(log_10(j-1))}}. (End)

From Hieronymus Fischer, Jun 25 2007: (Start)

The g.f. can be expressed in terms of a Lambert series, in that g(x)=(x/(1-x) - 9*L[b(k)](x))/(1-x) where L[b(k)](x) = sum{k >= 0, b(k)*x^k/(1-x^k)} is a Lambert series with b(k) = 1, if k > 1 is a power of 10, else b(k) = 0.

G.f.: g(x) = sum{k > 0, (1-9*c(k))*x^k}/(1-x), where c(k) = sum{j > 1, j|k,  floor(log_10(j)) - floor(log_10(j-1))}.

a(n) = n - 9*sum_{0 < k <= floor(log_10(n))} a(floor(n/10^k))*10^(k-1). (End)

From Hieronymus Fischer, Oct 06 2007: (Start)

a(n) <= 9*(1+floor(log_10(n)), equality holds for n = 10^m - 1, m > 0.

lim sup (a(n) - 9*log_10(n)) = 0 for n --> infinity.

lim inf (a(n+1) - a(n) + 9*log_10(n)) = 1 for n --> infinity. (End)

a(A051885(n)) = n.

a(n) <= 9*log_10(n+1). - Vladimir Shevelev, Jun 01 2011

a(n) = a(n-1) + a(n-10) - a(n-11), for n < 100. - Alexander R. Povolotsky, Oct 09 2011

a(n) = Sum_k >= 0 {A031298(n, k)}. - Philippe Deléham, Oct 21 2011

a(n) = a(n mod b^k) + a(floor(n/b^k)), for all k>=0. - Hieronymus Fischer, Mar 24 2014

a(n) = Sum_{k, 0, floor(log10(n))}(floor(n/10^k) - 10*floor(n/10^(k+1))). - José de Jesús Camacho Medina, Mar 31 2014

EXAMPLE

a(123) = 1 + 2 + 3 = 6, a(9875) = 9 + 8 + 7 + 5 = 29.

MAPLE

A007953 := proc(n) add(d, d=convert(n, base, 10)) ; end proc: # R. J. Mathar, Mar 17 2011

MATHEMATICA

Table[Sum[DigitCount[n][[i]] * i, {i, 9}], {n, 50}] (* Stefan Steinerberger, Mar 24 2006 *)

Table[Plus @@ IntegerDigits @ n, {n, 0, 87}] (* or *)

Nest[Flatten[# /. a_Integer -> Array[a + # &, 10, 0]] &, {0}, 2] (* Robert G. Wilson v, Jul 27 2006 *)

Table[Sum[Floor[n/10^k] - 10 * Floor[n/10^(k + 1)], {k, 0, Floor[Log[10, n]]}], {n, 300}] (* José de Jesús Camacho Medina, Mar 31 2014 *)

PROG

(PARI) a(n)=if(n<1, 0, if(n%10, a(n-1)+1, a(n/10)))

(PARI) A007953(n, b=10)={my(s=(n=divrem(n, b))[2]); while(n[1]>=b, s+=(n=divrem(n[1], b))[2]); s+n[1]} \\ - M. F. Hasler, Mar 22 2011

(Haskell)

a007953 n | n < 10 = n

          | otherwise = a007953 n' + r where (n', r) = divMod n 10

-- Reinhard Zumkeller, Nov 04 2011, Mar 19 2011

(MAGMA) [ &+Intseq(n): n in [0..87] ];  // Bruno Berselli, May 26 2011

(Smalltalk)

"Recursive version for general bases"

"Set base = 10 for this sequence"

digitalSum: base

| s |

base = 1 ifTrue: [^self].

(s := self // base) > 0

  ifTrue: [^(s digitalSum: base) + self - (s * base)]

  ifFalse: [^self]

"by Hieronymus Fischer, Mar 24 2014"

CROSSREFS

Cf. A003132, A055012, A055013, A055014, A055015, A010888, A007954, A031347, A055017, A076313, A076314, A007953, A003132, A054899, A138470, A138471, A138472, A000120, A004426, A004427, A054683, A054684, A179082-A179085, A108971, A179987, A179988, A180018, A180019.

Cf. A217928, A216407, A037123, A074784, A231688, A231689.

For n + digsum(n) see A062028.

Sequence in context: A131650 A033930 A076314 * A080463 A209685 A114570

Adjacent sequences:  A007950 A007951 A007952 * A007954 A007955 A007956

KEYWORD

nonn,base,nice,easy,changed

AUTHOR

R. Muller

EXTENSIONS

More terms from Hieronymus Fischer, Jun 17 2007

Edited by Michel Marcus, Nov 11 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified August 29 19:56 EDT 2014. Contains 246211 sequences.