a(n) = (q - p)/2, where p is the largest prime < n and q is the smallest prime > n.

A033559

a(n) = (q - p)/2, where p is the largest prime < n and q is the smallest prime > n.

Terms

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

External references