login
A359271
Number of odd digits necessary to write all nonnegative n-digit integers.
1
5, 95, 1400, 18500, 230000, 2750000, 32000000, 365000000, 4100000000, 45500000000, 500000000000, 5450000000000, 59000000000000, 635000000000000, 6800000000000000, 72500000000000000, 770000000000000000, 8150000000000000000
OFFSET
1,1
FORMULA
a(n) = 5 * (9*n+1) * 10^(n-2).
a(n) = A279766(10^n-1) - A279766(10^(n-1)-1).
a(n) = A113119(n) - A358439(n).
From Stefano Spezia, Dec 24 2022: (Start)
O.g.f.: 5*x*(1 - x)/(1 - 10*x)^2.
E.g.f.: (exp(10*x)*(1 + 90*x) - 1)/20. (End)
EXAMPLE
To write the integers from 10 up to 99, each of the digits 1, 3, 5, 7 and 9, must be used 19 times, hence a(2) = 19*5 = 95.
MAPLE
seq(5 * (9*n+1) * 10^(n-2), n=1..18);
MATHEMATICA
a[n_] := 5*(9*n + 1)*10^(n - 2); Array[a, 20] (* Amiram Eldar, Dec 23 2022 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Bernard Schott, Dec 23 2022
STATUS
approved