All right, so you want 3.5v to 4.7V from 0V to 5V.
The potential divider needs to scale 5V to 4.7V-3.5V = 1.2V
V
OUT = V
IN*R2/(R1+R2) = 5*2400/(7600+2400) = 1.2V
Good, you've got that bit right. Now let's look at the LM317. The voltage needs to be set to 3.5V.
V
OUT = V
REF*(1+R2/R1)
R1 is the value of R3 in the new circuit, which is 933Ohm
And R2 is equal to the value of R1 and R2 in parallel in the new circuit.
R2 = (7600*2400)/(7600+2400) = 1824
V
OUT = 1.25*(1+1824/933) = 3.69V
That's quite a bit off. Let's look at how to calculate R1 in the original LM317 circuit.
V
OUT = V
REF*(1+R2/R1)
Rearrange to make R1 the subject:
R1 = R2* V
REF/(V
OUT- V
REF)
R1 = 1824*1.25/(3.5-1.25) = 1013.33
Back to the new circuit:
R1 = 7.6k
R2 = 2.4k
R3 = 1.01333k
Now we have the ratio of the three resistor values, we can now look at choosing standard E24 or E96 values to match them. For that we can use an on-line calculator. Unfortunately the calculators, I could find are designed for three values are aimed at potential dividers, but they can still be used for this circuit, with a little arithmetic.
Imagine all the resistors are connected up in series: It would also make a potential divider.
The total value would be:
R
TOTAL = 7.6k+2.4k+1.01333k = 11.01333k
Now if we applied 11.01333V to the potential divider.
The voltage across each resistor would be equal to its value in kOhms so:
V1 = 11.01333V
V3 = 1.01333V
V2 = 2.4+1.01333 = 3.41333V
Here's where the calculator website comes in. If the above voltages are entered into the three resistor potential divider section, it will generate the nearest combination of standard resistor values which will give us as close to the desired resistor ratio as possible.
http://sim.okawa-denshi.jp/en/teikokeisan.htmFor E24 values it gives:
R1=5.1kΩ
R2=1.6kΩ
R3=680Ω
Which is probably near enough.
E96 values gives:
R1=3.09kΩ
R2=976Ω
R3=412Ω
Which is quite likely more precise than the LM317 so is a bit overkill.
Here's another potential divider tool which only works with two resistors, but can be handy for determining the ratio of R1 and R1: see the results in the "ideal values" section.
https://www.random-science-tools.com/electronics/divider.htmExercise for the reader: put the above values back into the original formulas and see how they match to the desired values.