login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057199 The first nontrivial (k>n+2) palindromic prime in both bases n and n+2. 0
5, 1667, 7517, 34853363, 116755331881, 20537111057, 373 (list; graph; refs; listen; history; text; internal format)
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified June 29 12:13 EDT 2017. Contains 288860 sequences.