login
A125897
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,3 and at least one of the digits 4,5,6,7,8,9.
18
10, 100, 994, 9796, 95650, 924820, 8845714, 83575396, 778945090, 7156197940, 64800104434, 578648865796, 5100362368930, 44424892053460, 382839350691154, 3268062540952996, 27665402010407170, 232490197792427380, 1941315874498269874
OFFSET
1,1
LINKS
FORMULA
a(n) = 18*8^n-63*7^n+111*6^n-120*5^n+83*4^n-36*3^n+9*2^n-1.
G.f.: -2*x*(20160*x^7 -54792*x^6 +53344*x^5 -28304*x^4 +8374*x^3 -1427*x^2 +130*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->18*8^n-63*7^n+111*6^n-120*5^n+83*4^n-36*3^n+9*2^n-1;
MATHEMATICA
Table[18*8^n-63*7^n+111*6^n-120*5^n+83*4^n-36*3^n+9*2^n-1, {n, 19}] (* James C. McMahon, Dec 22 2024 *)
PROG
(PARI) vector(100, n, 18*8^n-63*7^n+111*6^n-120*5^n+83*4^n-36*3^n+9*2^n-1) \\ Colin Barker, Feb 23 2015
CROSSREFS
Cf. A125630.
Sequence in context: A121084 A272501 A171284 * A395656 A182979 A355892
KEYWORD
nonn,base,easy
AUTHOR
Aleksandar M. Janjic and Milan Janjic, Feb 03 2007
STATUS
approved