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”).

A379138
a(n) is the first number that is the sum of two palindromic primes in exactly n ways.
1
0, 4, 10, 504, 25242, 1110, 28782, 46764, 46254, 86058, 50094, 47874, 107880, 108180, 110100, 108990, 107070, 109800, 2726262, 2830272, 2698962, 3029292, 2900982, 2799972, 2979792, 3100002, 2998992, 4498944, 4409034, 4709064, 4510044, 4916184, 4790874, 4787874, 4869684, 4959594, 4896984, 4891884
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
Sequence in context: A220197 A299880 A358928 * A085649 A152396 A326720
KEYWORD
nonn,new
AUTHOR
Robert Israel, Dec 15 2024
STATUS
approved