Explicație pas cu pas:
x:4=c r=3 => n=4c+3
c=0 => x=3 (A)
c=1 => x=7 (A)
c=2=> x=11 (A)
c=3 => x=15 (A)
c=4 => x=19 (A)
c=5 => x=23 (A)
c=6 => x=27 (A)
Nu mai continuam pentru ca x va fi >27
deci A={3,7,11,15,19,23,27}
x:5=c r=2 => x=5c+2
c=0 => x=2 (Fals) pt ca x>5
c=1 => x=7 (A)
c=2 => x=12(A)
c=3 => x=17(A)
c=4 => x=22(A)
c=5 => x=27(A)
Nu mai continuam pt ca daca c=6 => x>30
B={7,12,17,22,27}