Using the example for an ordinary annuity from here:-
Calculating The Present And Future Value Of Annuities
The example demonstrates how a present value principal of 4329.48 is paid down by five repayments of 1000 each discounted to present value by the interest rate and period.
The calculation can be represented by the following summation:
pis the principal,
d is the periodic payment,
r is the periodic interest rate and
n is the number of periods.
By induction this can be converted to a standard formula.
Mathematica does the induction calculation automatically:
p = (d - d (1 + r)^-n)/r
∴ d = (p r)/(1 - (1 + r)^-n)
Substituting your figures with variations, since 2% is rather high for a weekly rate and more typical of an annual rate.
principal, p = 5000
number of periods, n = 52
for annual effective rate of interest = 2%
weekly rate, r = (1 + 0.02)^(1/52) - 1 = 0.000380892
d = (p r)/(1 - (1 + r)^-n) = 97.1275
So with a 2% annual effective rate of interest the weekly instalment is 97.13
for an annual nominal rate of 2% compounded weekly
weekly rate, r = 0.02/52 = 0.000384615
d = (p r)/(1 - (1 + r)^-n) = 97.1371
With a 2% nominal rate compounded weekly the weekly instalment is 97.14
Alternatively, with periodic (weekly) rate,
r = 2% = 0.02
d = (p r)/(1 - (1 + r)^-n) = 155.545
With a weekly rate of 2% the annual effective rate is
(1 + 0.02)^52 - 1 = 180% per annum and the weekly instalment is 155.55