OFFSET
2,1
COMMENTS
LINKS
EXAMPLE
n=15: 2*15=30 and A002375(15)=3 with 30=7+23=11+19=13+17,
13+17 -> 1101+10001 needs a(15)=5 binary ones, whereas
7+23 -> 111+10111 and 11+19 -> 1011+10011 need more.
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):
V:= Vector(N): V[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 V[k] = 0 or t < V[k] then V[k]:= t fi
od
od:
convert(V[2..N], list); # Robert Israel, Mar 25 2018
MATHEMATICA
Min[#]&/@(Table[Total[Flatten[IntegerDigits[#, 2]]]&/@Select[ IntegerPartitions[ 2*n, {2}], AllTrue[#, PrimeQ]&], {n, 2, 110}]) (* Harvey P. Dale, Jul 27 2020 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jun 03 2005
STATUS
approved