P343
∧
projecteuler.net

Fractional Sequences

ℹ️Published on Saturday, 18th June 2011, 04:00 pm; Solved by 1552;
Difficulty rating: 35%

For any positive integer k, a finite sequence ai of fractions xi/yi is defined by:
a1=1/k and
ai=(xiβˆ’1+1)/(yiβˆ’1βˆ’1) reduced to lowest terms for i>1.
When ai reaches some integer n, the sequence stops. (That is, when yi=1.)
Define f(k)=n.
For example, for k=20:

1/20β†’2/19β†’3/18=1/6β†’2/5β†’3/4β†’4/3β†’5/2β†’6/1=6

So f(20)=6.

Also f(1)=1, f(2)=2, f(3)=1 and βˆ‘f(k3)=118937 for 1≀k≀100.

Find βˆ‘f(k3) for 1≀k≀2Γ—106.



Soluzione

Last modified: June 14, 2025. Website built with Franklin.jl and the lovely Julia programming language.