Approximation methods for the calculation of eigenvalues in ODE with periodic or anti periodic boundary conditions: Application to nanotubes