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 A268839 #30 Sep 13 2023 11:58:33 %S A268839 9,108,1197,13176,144945,1594404,17538453,192922992,2122152921, %T A268839 23343682140,256780503549,2824585539048,31070440929537, %U A268839 341774850224916,3759523352474085,41354756877214944,454902325649364393,5003925582143008332,55043181403573091661 %N A268839 a(n) = Sum_{j=1..10^n-1} 2^f(j) where f(j) is the number of zero digits in the decimal representation of j. %C A268839 We calculate the number of integers between 1 and 10^n - 1 having k zeros in their decimal representation. To form a such number consisting of m digits (k < m), place k zeros in m-1 possible positions, then we must choose m-k digits different from zero. Thus, the number of integers between 1 and 10^n - 1 having k zeros in their decimal representation is: Sum_{m=k+1..n} binomial(m-1, k)*9^(m-k). %C A268839 Hence the sum: Sum_{m=1..n} Sum_{k=0..m-1} binomial(m-1,k)*9^(m-k)*2^k = Sum_{m=1..n} 9^m*(11/9)*(m-1) = (9/10)*(11^n - 1). %H A268839 Colin Barker, <a href="/A268839/b268839.txt">Table of n, a(n) for n = 1..950</a> %H A268839 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (12,-11). %F A268839 a(n) = (9/10)*(11^n-1) = 9*A016123(n-1). %F A268839 From _Vincenzo Librandi_, Feb 15 2016: (Start) %F A268839 G.f.: (9*x)/((1-11*x)*(1-x)). %F A268839 a(n) = 11*a(n-1) + 9. (End) %F A268839 E.g.f.: 9*exp(x)*(exp(10*x) - 1)/10. - _Stefano Spezia_, Sep 13 2023 %e A268839 a(1) = 9 because 2^f(1) + 2^f(2) + ... + 2^f(9) = 2^0 + 2^0 + ... + 2^0 = 9; %e A268839 a(2) = 108 because 2^f(1) + 2^f(2) + ... + 2^f(99) = 9*10 + 2*9 = 108, where f(10) = f(20) = ... = f(90) = 1 and f(i) = 0 otherwise. %p A268839 for n from 1 to 100 do: x:=(9/10)*(11^n-1):printf(‘%d, ‘,x):od: %t A268839 Table[Table[(9/10) (11^n - 1), {n, 1, 20}]] (* _Bruno Berselli_, Feb 15 2016 *) %t A268839 CoefficientList[Series[9/((1 - 11 x) (1 - x)), {x, 0, 33}], x] (* _Vincenzo Librandi_, Feb 15 2016 *) %o A268839 (Magma) [(9/10)*(11^n-1): n in [1..20]]; // _Vincenzo Librandi_, Feb 15 2016 %o A268839 (PARI) Vec(9*x/((1-11*x)*(1-x)) + O(x^30)) \\ _Colin Barker_, Feb 22 2016 %Y A268839 Cf. A016123, A033713, A033714, A055641, A119291. %K A268839 nonn,base,easy %O A268839 1,1 %A A268839 _Michel Lagneau_, Feb 14 2016 %E A268839 Name edited by _Jon E. Schoenfield_, Sep 13 2017