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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113838 Palindromes sandwiched between twin primes. 1
4, 6, 282, 828, 858, 2112, 21012, 21612, 23832, 26262, 26862, 28182, 80208, 81018, 82728, 84348, 89598, 89898, 240042, 246642, 270072, 276672, 2035302, 2109012, 2136312, 2155512, 2182812, 2422242, 2428242, 2460642, 2499942, 2529252 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

For n > 2, the first and last digit of a(n) are either 2 or 8. - Chai Wah Wu, Jan 06 2016

Intersection of A002113 and A014574. - Michel Marcus, Jan 08 2016

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

EXAMPLE

282 is a palindrome and 281 and 283 are twin primes.

MATHEMATICA

palQ[n_]:= n == FromDigits@Reverse@IntegerDigits@n; lst={}; Do[If[palQ[n] && PrimeQ[n-1] && PrimeQ[n+1], AppendTo[lst, n]], {n, 2, 10^7, 2}]; lst

palQ[n_]:=Module[{idn=IntegerDigits[n]}, idn==Reverse[idn]]; Mean[#]&/@ Select[ Select[ Partition[Prime[Range[190000]], 2, 1], Last[#]-First[#] == 2&], palQ[Mean[#]]&] (* Harvey P. Dale, Jan 18 2012 *)

PROG

(PARI) isok(n) = my(d = digits(n)); (Vecrev(d)==d) && isprime(n-1) && isprime(n+1); \\ Michel Marcus, Jan 08 2016

CROSSREFS

Cf. A002113 (palindrome), A014574 (average of twin prime pair).

Sequence in context: A081970 A076098 A141568 * A056831 A027717 A035481

Adjacent sequences:  A113835 A113836 A113837 * A113839 A113840 A113841

KEYWORD

base,nonn

AUTHOR

Giovanni Resta, Jan 24 2006

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 December 9 08:37 EST 2021. Contains 349627 sequences. (Running on oeis4.)