OFFSET
0,2
COMMENTS
a(n) is the least k such that there are exactly n numbers j <= k/2 where both j and k - j are in A002385.
EXAMPLE
a(5) = 1110 because 1110 = 181 + 929 = 191 + 919 = 313 + 797 = 353 + 757 = 383 + 727 is the sum of two palindromic primes in exactly 5 ways, and no smaller even number works.
MAPLE
digrev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
F:= proc(d) # d-digit odd palindromic primes, d >= 3
local R, x, rx, i;
select(isprime, map(t -> seq(10^((d+1)/2)*t + i*10^((d-1)/2) + digrev(t), i=0..9), [$(10^((d-3)/2)) .. 10^((d-1)/2)-1]))
end proc:
PP:= [3, 5, 7, 11, op(F(3)), op(F(5)), op(F(7))]: nPP:= nops(PP):
V:= Vector(2*PP[-1], datatype=integer[1]):
for i from 1 to nPP do for j from 1 to i do
x:= PP[i]+PP[j];
V[x]:= V[x]+1
od od:
M:= max(V):
W:= Array(0..M, -1):
W[0]:= 0: W[1]:= 4:
for x from 1 to 2*PP[-1] do
if W[V[x]] = -1 then W[V[x]]:= x fi
od:
convert(W, list); # entries of -1 indicate values > 10^8
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Robert Israel, Dec 15 2024
STATUS
approved