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!)
 A165617 The number of values of k such that k is equal to the number of 1's in the base n digits of all numbers <= k. 1
 2, 4, 8, 4, 21, 5, 45, 49, 84 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 COMMENTS The greatest number counted by a(n) is 1...10, where the number of 1's is n-1. [From Martin J. Erickson (erickson(AT)truman.edu), Oct 08 2010] These numbers, described in previous comment, 10(2), 110(3), 1110(4), ... expressed in base 10 are: 2, 12, 84, 780, 9330, 137256, 2396744, 48427560, 1111111110, ... - Michel Marcus, Aug 20 2013 The sequence described in the previous two comments is A226238. - Ralf Stephan, Aug 25 2013 LINKS EXAMPLE a(3)=4 since there are four values of k such that k is equal to the number of 1's in the base 3 digits of all numbers <= k, namely, 1, 4, 5, 12. PROG (PARI) a(n) = {nmax = (n^n - 1)/(n - 1) - 1; s = 0; nb = 0; for (i=0, nmax, digs = digits(i, n); s += sum (k=1, #digs, (digs[k] == 1)); if (s == i, nb++); ); nb; } \\ Michel Marcus, Aug 20 2013 CROSSREFS Cf. A014778 Sequence in context: A294094 A290288 A126215 * A273170 A135447 A163339 Adjacent sequences:  A165614 A165615 A165616 * A165618 A165619 A165620 KEYWORD nonn,base AUTHOR Martin J. Erickson (erickson(AT)truman.edu), Sep 22 2009 EXTENSIONS Example corrected Martin J. Erickson (erickson(AT)truman.edu), Sep 25 2009 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 September 19 17:50 EDT 2020. Contains 337180 sequences. (Running on oeis4.)