Begin with n and consider numbers obtained by successively subtracting 0, 1, 2, 3, ...; a(n) = largest prime that arises in the process, i.e., largest prime of the form n - T(r), where T(r) is the r-th triangular number; or 0 if no such number exists.

A090302

Begin with n and consider numbers obtained by successively subtracting 0, 1, 2, 3, ...; a(n) = largest prime that arises in the process, i.e., largest prime of the form n - T(r), where T(r) is the r-th triangular number; or 0 if no such number exists.

Terms

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

External references