OFFSET
2,9
COMMENTS
a(A000079(n)) = 0.
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000
MAPLE
N:= 200: # to get a(2)..a(N)
Primes:= select(isprime, [seq(i, i=3..2*N-3, 2)]):
Ones:= map(t -> convert(convert(t, base, 2), `+`), Primes):
VL:= Vector(N): VL[2]:= 2:
VH:= Vector(N): VH[2]:= 2:
for i from 1 to nops(Primes) do
p:= Primes[i];
for j from 1 to i do
k:= (p+Primes[j])/2;
if k > N then break fi;
t:= Ones[i]+Ones[j];
if t > VH[k] then VH[k]:= t fi;
if VL[k]=0 or t < VL[k] then VL[k]:= t fi;
od
od:
convert((VH-VL)[2..N], list); # Robert Israel, Mar 26 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jun 03 2005
STATUS
approved