

A057199


The first nontrivial (k>n+2) palindromic prime in both bases n and n+2.


0




OFFSET

2,1


COMMENTS

a(9) > 5.5*10^22, a(10) = 181, a(11) = 161292069901, a(12) = 773.  Giovanni Resta, Feb 28 2013


LINKS

Table of n, a(n) for n=2..8.


EXAMPLE

a(3) = 1667 because it is the first prime > 5 which is a palindrome in both base 3 and 5.


MATHEMATICA

f[n_] := Block[{k = n + 3}, While[a = IntegerDigits[k, n]; b = IntegerDigits[k, n + 2]; ! PrimeQ[k]  a != Reverse[a]  b != Reverse[b], k++]; k]; Do[ Print[{n, f[n] // Timing}], {n, 2, 10}]


CROSSREFS

Cf. A048269.
Sequence in context: A123658 A262628 A237914 * A198246 A122465 A203683
Adjacent sequences: A057196 A057197 A057198 * A057200 A057201 A057202


KEYWORD

nonn,base,more


AUTHOR

Robert G. Wilson v, Sep 16 2000


EXTENSIONS

a(6)a(8) from Giovanni Resta, Feb 28 2013


STATUS

approved



