login
Numbers k such that 2k and 4k have the same number of Goldbach partitions into primes.
0

%I #12 Sep 03 2024 00:55:27

%S 2,3,5,7,8,11,13,23,37,41,47,53,56,71,77,83,92,122,137,158,167,248

%N Numbers k such that 2k and 4k have the same number of Goldbach partitions into primes.

%C No further terms up to 10^5.

%e Both 10 = 3+7 = 5+5 and 20 = 3+17 = 7+13 have two Goldbach partitions, so 5 is a term.

%p N:= 100000: # to test k <= N

%p P:= select(isprime, [2,seq(i,i=3..4*N-2,2)]):

%p G:= Vector(4*N):

%p for i from 1 to nops(P) do

%p jmax:= ListTools:-BinaryPlace(P,4*N-P[i]);

%p if jmax < i then break fi;

%p J:= P[i..jmax]+~ P[i];

%p G[J]:= G[J] +~ 1

%p od:

%p select(t -> G[2*t] = G[4*t], [$1..N]); # _Robert Israel_, Sep 02 2024

%t f[n_]:=Length[Select[2*n-Prime[Range[PrimePi[n]]],PrimeQ]];

%t Select[Range[250],f[#]==f[2*#]&]

%Y Cf. A045917.

%K nonn,more

%O 1,1

%A _Ivan N. Ianakiev_, Sep 01 2024