The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A270059 Number of distinct digits needed to write n in all bases >= 2. 0
 1, 1, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Table of n, a(n) for n=0..66. Index entries for linear recurrences with constant coefficients, signature (1, 1, -1). FORMULA For n >= 3, a(n) = floor((n + 3)/2). G.f.: 1 + (x*(1 + 2*x - x^2 - 2*x^3 + x^4))/((-1 + x)^2*(1 + x)). - Michael De Vlieger, Mar 09 2016 EXAMPLE 4 written in all bases 2,3,4,5,6,7,... is 100,11,10,4,4,4,... and the distinct digits needed are 0, 1 and 4, so a(4) = 3. MATHEMATICA Table[Length[Union@ Flatten@ Map[IntegerDigits[n, #] &, Range[2, n + 1]] /. {} -> {0}], {n, 0, 120}] (* or *) Table[Length[Union@ Flatten@ Map[IntegerDigits[n, #] &, Range[2, n + 1]] /. {} -> {0}], {n, 0, 2}]~Join~Table[Floor[(n + 3)/2], {n, 3, 120}] (* or *) CoefficientList[Series[1 + (x (1 + 2 x - x^2 - 2 x^3 + x^4))/((-1 + x)^2 (1 + x)), {x, 0, 120}], x] (* Michael De Vlieger, Mar 09 2016 *) PROG (PARI) a(n) = {if (n <= 1, 1, v = []; for (b=2, n+1, v = vecsort(concat(v, digits(n, b)), , 8)); #v; ); } \\ Michel Marcus, Mar 09 2016 CROSSREFS Cf. A008619, A266977. Sequence in context: A220845 A361469 A073750 * A120204 A177018 A156349 Adjacent sequences: A270056 A270057 A270058 * A270060 A270061 A270062 KEYWORD nonn,base AUTHOR Gionata Neri, Mar 09 2016 STATUS approved

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

Last modified July 15 16:36 EDT 2024. Contains 374333 sequences. (Running on oeis4.)