A vector a has components 3p and 1 with respect to rectangular cartesian system. This system is rotated through a certain angle about the origin in the counter clockwise sense. If, with respect to new system, a has components p+1 and √10, then a value of p is equal to