This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A270059 #14 Jul 04 2023 12:08:49 %S A270059 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, %T A270059 15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26, %U A270059 27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,34 %N A270059 Number of distinct digits needed to write n in all bases >= 2. %H A270059 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1, 1, -1). %F A270059 For n >= 3, a(n) = floor((n + 3)/2). %F A270059 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 %e A270059 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. %t A270059 Table[Length[Union@ Flatten@ Map[IntegerDigits[n, #] &, Range[2, n + 1]] /. {} -> {0}], {n, 0, 120}] (* or *) %t A270059 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 *) %t A270059 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 *) %o A270059 (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 %Y A270059 Cf. A008619, A266977. %K A270059 nonn,base %O A270059 0,3 %A A270059 _Gionata Neri_, Mar 09 2016