Add up the positive integers which are coprime to n in order (starting at 1). a(n) is the largest such partial sum that is <= n.

A117892

Add up the positive integers which are coprime to n in order (starting at 1). a(n) is the largest such partial sum that is <= n.

Terms

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

External references