
EXAMPLE

a(1)=1 because 2 in range (2^1sqrt(1), 2^1]=(1, 2] and 3 in range (2^1, 2^1+sqrt(1)]=(2, 3].
a(3)=6 because 59, 61 in range (2^6sqrt(2^6), 2^6]=(56, 64] and 67, 71 in range (2^6, 2^6+sqrt(2^6)]=(64, 72].
a(4)=10 because 997, 1009, 1013, 1019, 1021 in range (2^10sqrt(2^10), 2^10]=(992, 1024] and 1031, 1033, 1039, 1049, 1051 in range (2^10, 2^10+sqrt(2^10)]=(1024, 1056].


PROG

(PARI) ct(a, b)=sum(k=floor(a)+1, b, isprime(k))
is(n)=ct(2^nsqrt(2^n.5), 2^n)==ct(2^n, 2^n+sqrt(2^n+.5)) \\ Charles R Greathouse IV, Jul 19 2011
