login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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