Cubic forms, powers of primes and classification of elliptic curves