Wavefunctions for a hydrogen atom in a magnetic field based on some local properties