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”).

A126634
a(n) is the number of nonnegative integers k less than 10^n such that the decimal representation of k lacks the digits 1,2,3,4 and at least one of digits 5,6,7,8,9.
3
6, 36, 216, 1296, 7656, 44136, 248016, 1362096, 7338456, 38927736, 203958816, 1058224896, 5448329256, 27880971336, 141993797616, 720419919696, 3644189320056, 18390164454936, 92630272564416, 465876904526496, 2340309918950856, 11745320884258536
OFFSET
1,1
FORMULA
a(n) = 5*5^n-10*4^n+10*3^n-5*2^n+1.
G.f.: -6*x*(20*x^4-39*x^3+31*x^2-9*x+1) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(5*x-1)). - Colin Barker, Feb 22 2015
MAPLE
f:=n->5*5^n-10*4^n+10*3^n-5*2^n+1;
MATHEMATICA
LinearRecurrence[{15, -85, 225, -274, 120}, {6, 36, 216, 1296, 7656}, 30] (* Harvey P. Dale, Apr 01 2018 *)
PROG
(PARI) Vec(-6*x*(20*x^4-39*x^3+31*x^2-9*x+1) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(5*x-1)) + O(x^100)) \\ Colin Barker, Feb 22 2015
KEYWORD
nonn,base,easy
AUTHOR
Aleksandar M. Janjic and Milan Janjic, Feb 08 2007
STATUS
approved