Start with n and reach 2 by repeatedly either dividing by d where d <= the square root or by adding 1. The division steps are free, but adding 1 costs 1 point. a(n) is the smallest cost to reach 2.

A048825

Start with n and reach 2 by repeatedly either dividing by d where d <= the square root or by adding 1. The division steps are free, but adding 1 costs 1 point. a(n) is the smallest cost to reach 2.

Terms

    a(0) =0a(1) =1a(2) =0a(3) =2a(4) =1a(5) =1a(6) =0a(7) =1a(8) =2a(9) =1a(10) =0a(11) =2a(12) =1a(13) =1a(14) =0a(15) =2a(16) =1a(17) =3a(18) =2a(19) =1a(20) =1a(21) =1a(22) =0a(23) =2a(24) =2a(25) =1a(26) =1a(27) =2a(28) =1a(29) =1

External references