If the last 2007 digits of n and n^3 are the same, then n^3-n is divisible by 10^2007. n^3-n=n(n-1)(n+1), so n(n-1)(n+1) is divisible by 10^2007.

One way for n(n-1)(n+1) to be divisible by 10^2007 is that n is divisible by 10^2007. That gives n=10^2007. n-1 could be divisible by 10^2007, which gives n=1. n+1 could be divisible by 10^2007, which gives 10^2007-1. Therefore, 3 solutions are 1, 10^2007-1, and 10^2007.

Also, n could be divisible by 2^2007 and n-1 could be divisible by 5^2007. This gives a number ending in 09376 (A018248). If n is divisible by 5^2007 and n-1 is divisible by 2^2007, then n is a number ending in 90625 (A018247). If n is divisible by 2^2007 and n+1 is divisible by 5^2007, then n ends in 90624 (A091664). If n is divisible by 5^2007 and n+1 is divisible by 2^2007, then n ends in 09375 (A091663). If n-1 is divisible by 2^2007 and n+1 is divisible by 5^2007, then n ends in 81249 (A091661). If n-1 is divisible by 5^2007 and n+1 is divisible by 2^2007, then n ends in 18751 (A063006). Therefore, there are 6 more solutions.

If n-1 is divisible by 5*10^2006 but not by 10^2007, then n+1 has to be divisible by 2, so n(n-1)(n+1) is divisible by 10^2007. This gives a new solution n=5*10^2006+1. If n+1 is divisible by 5*10^2006 but not by 10^2007, then n=5*10^2006-1. Therefore, there are 2 new solutions.

There are also new solutions with 2^2006. If n is divisible by 5^2007 and n-1 is divisible by 2^2006 but not by 2^2007, then n+1 is divisible by 2, so n(n-1)(n+1) is divisible by 10^2007. This gives a new solution ending in 90625 (A018247+5*10^2006). If n is divisible by 5^2007 and n+1 is divisible by 2^2006 but not by 2^2007, then n is a new solution ending in 09375 (A091663+5*10^2006). If n-1 is divisible by 2^2006 but not by 2^2007 and n+1 is divisible by 5^2007, then n+1 is also divisible by 2, so n is a new solution ending in 81249 (A091661+5*10^2006). If n-1 is divisible by 5^2007 and n+1 is divisible by 2^2006 but not by 2^2007, then n is a new solution ending in 18751 (A063006+5*10^2006). Therefore, there are 4 new solutions. These are all the solutions, so there are 15 solutions for n.