OFFSET
1,1
LINKS
T. V. Raziman, Table of n, a(n) for n = 1..30
Quora, How many 2n digit numbers are there such that each digit is repeated even (possibly 0) times?
Index entries for linear recurrences with constant coefficients, signature (220,-16368,489280,-5395456,14745600).
FORMULA
a(n) = 9/10 * 1/(2^10) * (2 * 10^(2n) + 20 * 8^(2n) + 90 * 6^(2n) + 240 * 4^(2n) + 420 * 2^(2n)) (proved in the Quora answers).
G.f.: -9 *(1111680*x^4 -229888*x^3 +11424*x^2 -192*x +1) *x / ((100*x-1) *(4*x-1) *(36*x-1) *(64*x-1) *(16*x-1)). - Alois P. Heinz, Apr 17 2018
EXAMPLE
For n=1, the a(1)=9 numbers are 11, 22, 33, ..., 88, 99.
For n=2, the a(2)=252 numbers are 1001, 1010, 1100, 1111, 1122, 1212, 1221, ..., 9988, 9999.
MATHEMATICA
LinearRecurrence[{220, -16368, 489280, -5395456, 14745600}, {9, 252, 10944, 617472, 41457024}, 20] (* Paolo Xausa, Mar 10 2024 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
T. V. Raziman, Apr 17 2018
STATUS
approved