Pentatonic scales use 5 notes of the major scale. For a major it uses the 1st(root), 2nd, 3rd, 5th and 6th of that said scale. Ex using Cmaj:
C D E F G A B
1 2 3 4 5 6 7
So a major pentatonic uses the notes C, D, E, G and A.
The same formula applies to all the major scales
Ex using Dmaj:
D E F#...