The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A138471 Number of numbers less than n having the same sum of digits. 6
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0, 6, 6, 6, 6, 5, 4, 3, 2, 1, 0, 7, 7, 7, 6, 5, 4, 3, 2, 1, 0, 8, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 2, 3, 4, 5, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,21 COMMENTS A138470(n) + a(n) + A138472(n) = n; a(A051885(n)) = 0. a(A228915(n)) = a(n)+1. - Robert Israel, May 26 2017 LINKS Robert Israel, Table of n, a(n) for n = 0..10000 (terms 0..1500 from Reinhard Zumkeller) EXAMPLE a(42)=#{6,15,24,33}=4. MAPLE N:= 1000: # to get a(0) to a(N) C:= Vector(9*(1+ilog10(N))): A[0]:= 0: for n from 1 to N do   s:= convert(convert(n, base, 10), `+`);   A[n]:= C[s];   C[s]:= C[s]+1; od: seq(A[i], i=0..N); # Robert Israel, May 25 2017 MATHEMATICA Module[{nn=110, sd}, sd=Total[IntegerDigits[#]]&/@Range[nn]; Join[{0}, Table[ Count[Take[sd, i-1], sd[[i]]], {i, nn}]]] (* Harvey P. Dale, Aug 14 2013 *) PROG (PARI) a(n) = my(sdn=sumdigits(n)); sum(k=1, n-1, sumdigits(k) == sdn); \\ Michel Marcus, May 26 2017 CROSSREFS Cf. A007953, A051885, A138470, A138472, A228915. Sequence in context: A263204 A194322 A052010 * A102669 A248327 A055098 Adjacent sequences:  A138468 A138469 A138470 * A138472 A138473 A138474 KEYWORD nonn,base,look AUTHOR Reinhard Zumkeller, Mar 19 2008 STATUS approved

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

Last modified July 27 04:47 EDT 2021. Contains 346305 sequences. (Running on oeis4.)