I do not feel that the existing answers are quite "safe" as shown.
m_goldberg's code does not localize i correctly, e.g.
i = "fail!";
Grid[With[{j = i 100 + 17}, Table[{j, PrimeQ[j]}, {i, 0, 20}]]]
17+100 fail! False
17+100 fail! False
17+100 fail! False
. . .
This is subtle as normally i is localized by Table but here is it evaluated ouside Table. This could be improved by using the delayed form of With but note that the expression will be evaluated as many times as j appears which could be significant in some code.
Nasser's code has a similar problem in that j is not localized which could interfere with other code.
Solutions
Here are three methods that each scope properly. (Grid omitted for clarity.)
(* Function *)
Table[{#, PrimeQ[#]} &[i 100 + 17], {i, 0, 20}]
(* replacement - "injector pattern" *)
Table[i 100 + 17 /. j_ :> {j, PrimeQ[j]}, {i, 0, 20}]
(* Table dummy iterator *)
Table[{j, PrimeQ[j]}, {j, {i 100 + 17}}, {i, 0, 20}] // First
Grid[Table[{j = i*100 + 17, PrimeQ[j]}, {i, 0, 20}]]? – kglr Jan 27 '17 at 03:27With[]and other scoping constructs are usable withinTable[], you know... – J. M.'s missing motivation Jan 27 '17 at 03:33Table[{j,PrimeQ[j]},{j,Table[100i+17,{i,0,20}]}]or the simpler versionTable[{j,PrimeQ[j]},{j,100 Range[0,20]+17}]. – Carl Woll Jan 27 '17 at 03:43{#, #}& [1 +1]. – Kuba Jan 27 '17 at 07:39