login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A126633
a(n) is the number of nonnegative integers k less than 10^n such that the decimal representation of k lacks at least one of digits 1, 2, at least one of digits 3,4, at least one of digits 5,6 and at least one of digits 7,8,9.
3
10, 94, 832, 6946, 54880, 412714, 2975752, 20722306, 140285200, 928323034, 6031661272, 38617025266, 244322679520, 1531014308554, 9519483716392, 58816232361826, 361524350929840, 2212804949145274, 13497228660885112
OFFSET
1,1
FORMULA
a(n) = 24*6^n-60*5^n+62*4^n-33*3^n+9*2^n-1.
G.f.: -2*x*(360*x^5-882*x^4+713*x^3-304*x^2+58*x-5) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(5*x-1)*(6*x-1)). - Colin Barker, May 04 2014
MAPLE
A126633:=n->24*6^n-60*5^n+62*4^n-33*3^n+9*2^n-1; seq(A126633(n), n=1..20);
MATHEMATICA
Table[24*6^n - 60*5^n + 62*4^n - 33*3^n + 9*2^n - 1, {n, 20}] (* Wesley Ivan Hurt, May 03 2014 *)
LinearRecurrence[{21, -175, 735, -1624, 1764, -720}, {10, 94, 832, 6946, 54880, 412714}, 30] (* Harvey P. Dale, May 05 2018 *)
KEYWORD
nonn,base,easy
AUTHOR
Aleksandar M. Janjic and Milan Janjic, Feb 08 2007
STATUS
approved