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

A126632
a(n) is the number of nonnegative integers k less than 10^n such that the decimal representation of k lacks the digit 1, at least one of digits 2,3, at least one of digits 4,5,6 and at least one of digits 7,8,9.
3
9, 79, 669, 5431, 42189, 314119, 2251629, 15625591, 105563469, 697683559, 4529641389, 28986744151, 183339095949, 1148652643399, 7141191155949, 44118519949111, 271168742599629, 1659705919705639, 10123331198091309, 61571999920648471
OFFSET
1,1
FORMULA
a(n) = 18*6^n-45*5^n+48*4^n-27*3^n+8*2^n-1.
G.f.: -x*(720*x^5-1764*x^4+1408*x^3-585*x^2+110*x-9) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(5*x-1)*(6*x-1)). - Colin Barker, Feb 22 2015
EXAMPLE
a(8) = 15625591.
MAPLE
f:=n->18*6^n-45*5^n+48*4^n-27*3^n+8*2^n-1;
MATHEMATICA
LinearRecurrence[{21, -175, 735, -1624, 1764, -720}, {9, 79, 669, 5431, 42189, 314119}, 20] (* James C. McMahon, Dec 26 2024 *)
PROG
(PARI) Vec(-x*(720*x^5-1764*x^4+1408*x^3-585*x^2+110*x-9) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(5*x-1)*(6*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