|
|
MATHEMATICA
| PreBasveo[w_, x_] := Ceiling[x/w - Floor[x/w]]*5; Basveo[w_, x_, y_, z_, i_] := If[PreBasveo[w, Last[IntegerDigits[y, x]]] > 0, y + z, y + i]; ItterativeBasveo[x1_, x2_, x3_, x4_, x5_, x6_] := Catch[Basvar = x4; For[i = 1, i < x1, Basvar = Basveo[x2, x3, Basvar, x5, x6]; i++ ]; Throw[Basvar] ]; SqrRange[x_] := IntegerPart[x]; TriRange[x_] := IntegerPart[(Sqrt[8x + 1] - 1)/2]; For[A=2, A<32, Print[Mod[ItterativeBasveo[SqrRange[A]^2-SqrRange[A], 7, 9, A, SqrRange[A], SqrRange[A]-1+SqrRange[SqrRange[A]]+1], 6]] ; A++ ];
|