F(6) = 27 917
F(1) = 5
F(2) = 5*5+7*2 = 39
F(3) = 5*39+7*3 = 216
F(4) = 5*216+7*4 = 1 108
F(5) = 5*1108+7*5 = 5 575
F(6) = 5*5575+7*6 = 27 917
F(6) = 27 917
F(1) = 5
F(2) = 5*5+7*2 = 39
F(3) = 5*39+7*3 = 216
F(4) = 5*216+7*4 = 1 108
F(5) = 5*1108+7*5 = 5 575
F(6) = 5*5575+7*6 = 27 917