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!)
A088269 Palindromic primes that yield a prime when sandwiched between two 1's. (Prefixing and suffixing a 1 on both sides yields another palindromic prime.) 5

%I #21 Nov 20 2018 05:18:40

%S 3,5,131,383,797,11411,16061,16361,19391,33533,36263,73037,75557,

%T 79397,1074701,1126211,1145411,1175711,1221221,1243421,1287821,

%U 1303031,1311131,1328231,1363631,1489841,1579751,1600061,1707071,1748471

%N Palindromic primes that yield a prime when sandwiched between two 1's. (Prefixing and suffixing a 1 on both sides yields another palindromic prime.)

%C There are two 1-digit terms, three 3-digit terms, nine 5-digit terms, 93 7-digit terms, 241 9-digit terms and no terms with an even number of digits. - _Zak Seidov_, Feb 23 2005

%H Harvey P. Dale, <a href="/A088269/b088269.txt">Table of n, a(n) for n = 1..100</a>

%e Take palindromic primes (A002385) and see whether inserting them between two digits '1' again yields a prime:

%e Insert a(1) = 3 between the digits of 11 to get 131, a prime.

%e Insert a(2) = 5 between the digits of 11 to get 151, a prime.

%e Inserting 11 between two '1's yields 1111 = 11 * 101, not a prime.

%e Insert a(3) = 131 between the digits of 11 to get 11311, a prime.

%e Insert a(10) = 33533 between the digits of 11 to get 1335331, a prime, etc.

%e 797 is a term as 17971 is also a prime.

%t Do[If[PrimeQ[n] && Reverse[IntegerDigits[n]] == IntegerDigits[n] && PrimeQ[ToExpression["1" <> ToString[n*10+1]]], Print[n]], {n, 1, 2*10^6}] (* _Ryan Propper_, Jul 09 2005 *)

%t palsQ[n_]:=Module[{idn=IntegerDigits[n],idn1},idn1=Join[{1},idn,{1}]; idn==Reverse[idn]&&idn1==Reverse[idn1]&&PrimeQ[FromDigits[idn1]]]; Select[Prime[Range[150000]],palsQ] (* _Harvey P. Dale_, Jan 04 2012 *)

%o (PARI) is_A088269(n)={isprime(n)&&(n=digits(n))==Vecrev(n)&&isprime(fromdigits(concat([1,n,1])))} \\ _M. F. Hasler_, Nov 19 2018

%Y Cf. A088270, A088271, A088272.

%Y Cf. A002385.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Sep 28 2003

%E a(6)-a(30) from _Ryan Propper_, Jul 09 2005

%E Entry revised by _N. J. A. Sloane_, Apr 29 2007

%E Edited by _M. F. Hasler_, Nov 19 2018

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 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)