login
A108423
a(n) = A108422(n) - A108421(n).
3
0, 0, 0, 1, 0, 1, 0, 1, 2, 2, 1, 0, 1, 2, 0, 3, 2, 2, 2, 3, 3, 3, 1, 2, 2, 4, 1, 3, 3, 3, 0, 1, 0, 4, 3, 3, 4, 5, 2, 3, 4, 2, 3, 5, 4, 4, 1, 0, 4, 4, 3, 4, 4, 4, 2, 4, 2, 4, 3, 2, 1, 3, 0, 3, 2, 5, 4, 4, 5, 4, 3, 4, 4, 5, 3, 5, 5, 5, 2, 3, 4, 4, 4, 5, 3, 6, 1, 3, 5, 3, 1, 5, 4, 2, 1, 4, 4, 6, 4, 4, 4, 6, 2, 6, 4
OFFSET
2,9
COMMENTS
a(A000079(n)) = 0.
LINKS
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
Sequence in context: A226289 A107063 A290453 * A361154 A208568 A193804
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jun 03 2005
STATUS
approved