OFFSET
1,1
EXAMPLE
a(1) = 44 because 44 is the smallest (first) palindrome that is 1 more than a prime (43) and 1 less than a triangular number (45).
MATHEMATICA
Do[t = n(n + 1)/2 - 1; If[EvenQ[t], If[PrimeQ[t - 1], If[t == FromDigits[ Reverse[ IntegerDigits[ t]]], Print[t]]]], {n, 10^9}] (* _Robert G. Wilson v, Nov 04 2004 *)
Select[Accumulate[Range[227*10^7]]-1, PalindromeQ[#]&&PrimeQ[#-1]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 02 2020 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Anonymous, Nov 02 2004
STATUS
approved