login
A125880
a(n) is the number of nonnegative integers k less than 10^n such that the decimal representation of k lacks at least one of the digits 1,2 and at least one of the digits 3,4,5,6,7,8,9.
19
10, 98, 946, 9026, 85330, 800738, 7463746, 69054146, 633214450, 5746812578, 51574432546, 457575310466, 4014480866770, 34850492651618, 299615359353346, 2553264555537986, 21587837904314290, 181256003521421858, 1512536914179602146, 12553861394003656706
OFFSET
1,1
LINKS
FORMULA
a(n) = 14*8^n-49*7^n+91*6^n-105*5^n+77*4^n-35*3^n+9*2^n-1.
G.f.: -2*x*(20160*x^7 -54792*x^6 +53420*x^5 -28436*x^4 +8441*x^3 -1439*x^2 +131*x -5) / ((x -1)*(2*x -1)*(3*x -1)*(4*x -1)*(5*x -1)*(6*x -1)*(7*x -1)*(8*x -1)). - Colin Barker, Feb 23 2015
MAPLE
f:=n->14*8^n-49*7^n+91*6^n-105*5^n+77*4^n-35*3^n+9*2^n-1;
MATHEMATICA
Table[14*8^n-49*7^n+91*6^n-105*5^n+77*4^n-35*3^n+9*2^n-1, {n, 20}] (* James C. McMahon, Dec 22 2024 *)
PROG
(PARI) vector(100, n, 14*8^n-49*7^n+91*6^n-105*5^n+77*4^n-35*3^n+9*2^n-1) \\ Colin Barker, Feb 23 2015
CROSSREFS
Cf. A125630.
Sequence in context: A198968 A125946 A158513 * A125445 A163446 A190869
KEYWORD
nonn,base,easy
AUTHOR
Aleksandar M. Janjic and Milan Janjic, Feb 03 2007, Feb 13 2007
STATUS
approved