A334320 Number of even integers in base n with exactly two distinct digits.
0, 0, 1, 1, 5, 6, 13, 15, 25, 28, 41, 45, 61, 66, 85, 91, 113, 120, 145, 153, 181, 190, 221, 231, 265, 276, 313, 325, 365, 378, 421, 435, 481, 496, 545, 561, 613, 630, 685, 703, 761, 780, 841, 861, 925, 946, 1013, 1035, 1105, 1128, 1201, 1225, 1301, 1326, 1405
Offset: 0
Examples
a(4) = 5: 10, 12, 20, 30, 32 (written in base 4). a(7) = 15: 13, 15, 20, 24, 26, 31, 35, 40, 42, 46, 51, 53, 60, 62, 64 (written in base 7).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Column k=2 of A334318.
Formula
G.f.: -(x^3+2*x^2+1)*x^2/((x+1)^2*(x-1)^3).
a(n) = A334318(n,2).