OFFSET
1,1
COMMENTS
All palindromes considered are odd-length.
This sequence illustrates the local symmetric structure of prime gaps and the frequent occurrence of the (6,6) pair in prime constellations.
LINKS
Rémy Sigrist, C++ program
FORMULA
EXAMPLE
Initial solutions:
------------------------------------------------------------
1 | 3 | [2, 4, 2]
2 | 3 | [2, 4, 2, 4, 2]
3 | 7 | [2, 4, 6, 2, 6, 4, 2]
4 | 6 | [4, 2, 4, 6, 2, 6, 4, 2, 4]
5 | 33 | [2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2]
6 | 541133 | [4, 6, 12, 18, 2, 10, 20, 10, 2, 18, 12, 6, 4]
MAPLE
next_gap := proc(i)
ithprime(i+1) - ithprime(i);
end proc:
find_smallest_k_palindrome := proc(n, max_iter)
local A, i, k, j, sublist;
A := [];
for i from 1 to max_iter do
A := [op(A), next_gap(i)];
if nops(A) >= 2*n+1 then
for k from 1 to nops(A)-2*n do
sublist := [seq(A[t], t=k..k+2*n)];
if sublist = ListTools:-Reverse(sublist) then
return [k, sublist];
end if;
end do;
end if;
end do;
return FAIL;
end proc:for n from 1 to 8 do
result := find_smallest_k_palindrome(n, 20000);
if result <> FAIL then
printf("n=%d, k=%d, %a\n", n, result[1], result[2]);
else
printf("n=%d, aucun\n", n);
end if;
end do:
PROG
(C++) // See Links section.
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Michel Lagneau, Mar 20 2026
EXTENSIONS
a(7)-a(8) from Sean A. Irvine, Mar 28 2026
a(9) from Rémy Sigrist, Mar 29 2026
a(10)-a(11) from Pontus von Brömssen, Apr 07 2026
STATUS
approved
