login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A195294 Smallest palindromic prime containing the n-th palindrome as central digit(s), or 0 if no such prime exists. 1

%I #32 Aug 03 2014 14:27:53

%S 101,313,2,3,11411,5,10601,7,181,191,11,0,0,0,0,0,0,0,0,101,1311131,

%T 1212121,131,11411,151,1616161,1117111,181,191,1120211,1221221,72227,

%U 32323,12421,3425243,1126211,12721,12821,1129211,73037,313,73237,13331,1134311,353

%N Smallest palindromic prime containing the n-th palindrome as central digit(s), or 0 if no such prime exists.

%H Arkadiusz Wesolowski, <a href="/A195294/b195294.txt">Table of n, a(n) for n = 1..11000</a>

%H G. L. Honaker, Jr. & C. K. Caldwell, <a href="http://www.utm.edu/staff/caldwell/preprints/JRM_prime_pyramids.pdf">Palindromic Prime Pyramids</a>, p. 1.

%H G. L. Honaker, Jr. & C. K. Caldwell, <a href="http://www.utm.edu/staff/caldwell/supplements">Supplement to "Palindromic Prime Pyramids"</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PalindromicNumber.html">Palindromic Number</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PalindromicPrime.html">Palindromic Prime</a>

%H <a href="/index/Pac#palindromes">Index entries for sequences related to palindromes</a>

%e a(5) = 11411 because A002113(5) = 4 and 4, 141, 343, 737, 939, and 10401 are all composite, but 11411 is prime.

%e a(12) = 0 because A002113(12) = 22 and every palindrome with 22 in the center (22, 1221, 2222, ...) has an even number of digits, so is divisible by 11.

%t lst1 = {}; lst2 = {}; r = 353; Do[d = IntegerDigits[n, 10]; If[Reverse[d] == d, AppendTo[lst1, n]], {n, r}]; Do[a = lst1[[p]]; If[EvenQ@IntegerLength[a] && ! PrimeQ[a], AppendTo[lst2, 0], If[PrimeQ[a], b = a, n = 1; While[True, b = FromDigits[Join[Flatten@IntegerDigits@PadLeft[{a}, 2, n], Reverse@IntegerDigits[n]]]; If[PrimeQ[b], Break[]]; n++]]; AppendTo[lst2, b]], {p, Count[lst1, _Integer]}]; Prepend[lst2, 101] (* _Arkadiusz Wesolowski_, Jan 29 2012 *)

%Y Supersequence of A002385 (palindromic primes).

%K base,nonn

%O 1,1

%A _Arkadiusz Wesolowski_, Sep 14 2011

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)