how to recursively check subarrays of length n (of an array of length N) if they are equal ?

eg indices,

n= 2 -> 1+2=3+4=....

n=5 -> 1+2+3+4+5=6+7+8+9+10=

this is simple but i don't know how im new i just learn loop but i need its recursiveness

thanks

eg indices,

n= 2 -> 1+2=3+4=....

n=5 -> 1+2+3+4+5=6+7+8+9+10=

this is simple but i don't know how im new i just learn loop but i need its recursiveness

thanks