OFFSET
1,1
COMMENTS
p and 2p+1 are primes (cf. A005384) and p is a palindrome.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
H. Dubner, Palindromic Sophie Germain primes, Journal of Recreational Mathematics, Vol. 26, No. 1, pp. 38-41, 1994.
MAPLE
makepali:= proc(n, d) local L; # case with d odd
L:= convert(n, base, 10);
10^((d-1)/2)*n + add(L[i]*10^((d+1)/2-i), i=2..(d+1)/2)
end proc:
N:= 100: # for a(1)..a(N)
R:= 2, 3, 5, 11: count:= 4:
for d from 3 by 2 while count < N do
for i in [1, 3, 7, 9] while count < N do
for x from 0 to 10^((d-1)/2)-1 while count < N do
y:= makepali(i*10^((d-1)/2)+x, d);
if isprime(y) and isprime(2*y+1) then
R:= R, y;
count:= count+1;
fi
od od od:
R; # Robert Israel, Nov 22 2020
MATHEMATICA
Select[Prime[Range[125000]], PrimeQ[2#+1]&&PalindromeQ[#]&] (* Harvey P. Dale, Nov 21 2021 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Warut Roonguthai Dec 11 1999
STATUS
approved