login
A126645
a(n) is the number of integers k less than 10^n such that the decimal representation of k lacks the digits 1,2,3,4 and 5, at least one of digits 6,7 and at least one of digits 8,9.
4
5, 21, 77, 261, 845, 2661, 8237, 25221, 76685, 232101, 700397, 2109381, 6344525, 19066341, 57264557, 171924741, 516036365, 1548633381, 4646948717, 13942943301, 41833024205, 125507461221, 376539160877, 1129651037061, 3389020220045, 10167194877861
OFFSET
1,1
FORMULA
a(n) = 4*3^n-4*2^n+1.
a(n) = 6*a(n-1)-11*a(n-2)+6*a(n-3). - Colin Barker, Feb 22 2015
G.f.: -x*(6*x^2-9*x+5) / ((x-1)*(2*x-1)*(3*x-1)). - Colin Barker, Feb 22 2015
MAPLE
f:=n->4*3^n-4*2^n+1;
PROG
(PARI) Vec(-x*(6*x^2-9*x+5)/((x-1)*(2*x-1)*(3*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