loop bitwise exponential with modulus ? (solved)

I want to give a little headache to the mathematician.
I want to put a formula in a loop.

My context is the following.

awefdaf3.jpg

i need use Bitwise and Moduluse.
thank for sugestion
PHP:
            for (var i=0,D=p.f46e42DX;i<6;i++){
                D = (~D+1)*((i+1)%2);
                console.log('D : ', D );
                $gameScreen.showPicture(pID++, this.pFNR[0+i], 1, p.c85109[0]+D, p.c85109[1]).spine(spineIDReward); //#c85109 REWARD ICONS
            }
My little coffee with rum, which prevents me to find a formula coherente, I absolutely want to go through these 2 operators.
Do you have any mathematical suggestion?

I just have to spread the images here by the center
Therefore logically.
Pic 1: -50X
pic2: +50X
Pic3:-100X
Pix4:+100X
pic5:-150X
pic6:+150X .....
.........................

thank for help


edit:
easy way with random
PHP:
    var startingID = ~~(Math.random() * (this._aniControler._motionStep.starting[lastDX].length)); //starting
    var startingMotion = this._aniControler.getMotionFromName(this._aniControler._motionStep.starting[lastDX][startingID]);
    var reverseID = ~~(Math.random() * (this._aniControler._motionStep.reversing[lastDX].length)); //reversing
    var reversingMotion = this._aniControler.getMotionFromName(this._aniControler._motionStep.reversing[lastDX][reverseID]);
    var movingID = ~~(Math.random() * (this._aniControler._motionStep.moving[lastDX].length)); //moving
    var movingMotion = this._aniControler.getMotionFromName(this._aniControler._motionStep.moving[lastDX][movingID]);
    var endingID = ~~(Math.random() * (this._aniControler._motionStep.ending[lastDX].length)); //ending
    var endingMotion = this._aniControler.getMotionFromName(this._aniControler._motionStep.ending[lastDX][endingID]);

Original thread: https://forums.rpgmakerweb.com/threads/loop-bitwise-exponential-with-modulus-solved.81647/