A126642 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 and at least one of digits 6,7,8,9.
5, 25, 125, 601, 2765, 12265, 52925, 223801, 932525, 3844105, 15722525, 63936601, 258902285, 1045109545, 4209004925, 16921851001, 67945160045, 272554432585, 1092540156125, 4377129999001, 17529432313805, 70180474597225, 280910151192125
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 (10,-35,50,-24).
Crossrefs
Programs
-
Maple
f:=n->4*4^n-6*3^n+4*2^n-1;
-
PARI
Vec(-x*(24*x^3-50*x^2+25*x-5) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)) + O(x^100)) \\ Colin Barker, Feb 22 2015
Formula
a(n) = 4*4^n-6*3^n+4*2^n-1.
a(n) = 10*a(n-1)-35*a(n-2)+50*a(n-3)-24*a(n-4). - Colin Barker, Feb 22 2015
G.f.: -x*(24*x^3-50*x^2+25*x-5) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)). - Colin Barker, Feb 22 2015