If the smallest prime with a square excess of n is p then a(n)=p-n.

A056894

If the smallest prime with a square excess of n is p then a(n)=p-n.

Terms

    a(0) =1a(1) =1a(2) =4a(3) =9a(4) =36a(5) =25a(6) =16a(7) =81a(8) =64a(9) =49a(10) =36a(11) =49a(12) =100a(13) =225a(14) =64a(15) =81a(16) =576a(17) =121a(18) =144a(19) =441a(20) =256a(21) =169a(22) =144a(23) =169a(24) =256a(25) =225a(26) =196a(27) =289a(28) =324a(29) =961

External references