# Need to parallelize function f in a iteration

I don't have experience using Mathematica for parallel calculation. I need to do something simple to parallelize the calculation of f which is calculate each time n iterates:

f[k_] := Sum[r[j], {j, k}];
SetSharedFunction[f]

r[1] = 1;
f[1] = 2;

Table[r[n] = 2 r[n - 1] + f[n - 1], {n, 2, 4}]


Thanks for your help.

-
Would something like this work for you? f[k_] := Sum[r[j], {j, k}]; r[1] = 1; f[1] = 2; r[n_] := r[n] = 2 r[n - 1] + f[n - 1]; SetSharedFunction[f, r]; ParallelTable[r[n], {n, 2, 18}] –  chris May 17 '14 at 23:34
it's a recursive formula, so it is not parallelizable, using ParallelTable, etc., won't help there either –  Wizard May 19 '14 at 22:46