login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A085054 Smallest palindromic prime containing the n-th palindrome. 1
101, 11, 2, 3, 11411, 5, 10601, 7, 181, 191, 11, 72227, 13331, 1444441, 15551, 16661, 77377, 78887, 19991, 101, 1114111, 1212121, 131, 11411, 151, 1611161, 1117111, 181, 191, 1120211, 1212121, 72227, 32323, 12421, 3252523, 1126211, 12721, 12821 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..38.

EXAMPLE

1311131 contains the palindrome 111.

MATHEMATICA

NextPalindrome[n_] := Block[ {l = Floor[ Log[ 10, n] + 1], idn = IntegerDigits[ n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]]]],

idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]]; f[n_] := Block[{k = 0, s = ToString[n]}, While[ !PrimeQ[k] || FromDigits[ Reverse[ IntegerDigits[k]]] != k || StringPosition[ ToString[k], s] == {}, k++ ]; k]; Map[f, NestList[ NextPalindrome, 0, 40]]

CROSSREFS

Cf. A002113, A083982.

Sequence in context: A341634 A060386 A062584 * A084045 A085419 A083982

Adjacent sequences:  A085051 A085052 A085053 * A085055 A085056 A085057

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 26 2003

EXTENSIONS

Edited, corrected and extended by Robert G. Wilson v, Jun 28 2003

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 28 00:54 EDT 2021. Contains 346316 sequences. (Running on oeis4.)