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.
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
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets
- Index entries for linear recurrences with constant coefficients, signature (6,-11,6).
Crossrefs
Programs
-
Maple
f:=n->4*3^n-4*2^n+1;
-
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
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