A proof that a(5) is the last term of this sequence: Suppose there exists a number A that is the smallest positive integer that begins a run of 6 consecutive integers A, B, C, D, E, and F having exactly 2, 4, 6, 8, 10, and 12 divisors, respectively. (If F+1 does not have exactly 14 divisors, then a(6)=A; otherwise, a(n)=A for some n > 6.) Suppose further that an exhaustive search up to, say, 10^7 has determined that A > 10^7. (My exhaustive search went far beyond that.) A is a prime p_A > 10^7, hence odd. B = A+1 is thus even, and since it has exactly 4 divisors (and is not 2^3), B = 2*p_B for some prime p_B. Of the 3 consecutive integers A, B, and C, neither A nor B can be divisible by 3, so C must be, and since C has exactly 6 divisors (and is not 3^5), C is either 9*p_C or 3*(p_C)^2 for some prime p_C. D is divisible by 4 since D-2 = B is twice an odd number, and since D has exactly 8 divisors (and is not 2^7), D = 8*p_D for some prime p_D. Of the 5 consecutive integers A..E, none of A..D is divisible by 5, so E must be. Since C is an odd multiple of 3, F = C+3 is divisible by 6, but not by 4 (since D = F-2 is), and since F has exactly 12 divisors (and is not 3^5 * 2), F is either 18*p_F or 6*(p_F)^2 for some prime p_F. It follows from the above that A-1 is divisible by 3, 4, and 5, but not by 8, since 8 divides D. Thus, (A-1) mod 120 = 60, and the residues modulo 120 of A..F are 61..66, respectively. Since 3*(p_C)^2 mod 120 is not 63 for any integer p_C, C must be 9*p_C for some prime p_C. Likewise, since 6*(p_F)^2 mod 120 is not 66 for any integer p_F, F must be 18*p_F for some prime p_F. But this means 9 divides both C and F, yet F = C+3, a contradiction. Thus, there is no run of 6 consecutive integers A..F having exactly 2, 4, 6, 8, 10, and 12 divisors, respectively, so a(n) = 0 for all n > 5.