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!)
A282811 Numbers n such that n and n + 1 are both composite and the reverse of n and n + 1 are both prime. 1
34, 91, 118, 124, 133, 145, 300, 361, 364, 370, 376, 391, 721, 730, 745, 754, 763, 775, 778, 784, 790, 904, 916, 931, 943, 973, 994, 1003, 1015, 1075, 1081, 1084, 1099, 1105, 1126, 1138, 1189, 1204, 1255, 1261, 1324, 1348, 1351, 1393, 1444, 1477 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Related to a palindrome, a semordnilap is a word that when reversed results in a new, different, valid word. For example the semordnilap of the word "desserts" is the word "stressed". Applying this principle to numbers, any number is either a palindrome or a semordnilap. This sequence deals with adjacent composite numbers whose semordnilap numbers are prime.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
For n = 2 * 17 = 34, which reverses to 43, a prime, we have n + 1 = 5 * 7 = 35, which reverses to 53, also a prime.
MATHEMATICA
searchMax = 2000; Select[Complement[Range[searchMax], Prime[Range[PrimePi[searchMax]]]], Not[PrimeQ[# + 1]] && PrimeQ[FromDigits[Reverse[IntegerDigits[#]]]] && PrimeQ[FromDigits[Reverse[IntegerDigits[# + 1]]]] &] (* Alonso del Arte, Feb 23 2017 *)
Select[Partition[Range[1500], 2, 1], AllTrue[#, CompositeQ] && AllTrue[ IntegerReverse[#], PrimeQ]&][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 10 2017 *)
PROG
(PARI) rev(n)=fromdigits(Vecrev(digits(n)))
is(n)=isprime(rev(n)) && isprime(rev(n+1)) && !isprime(n) && !isprime(n+1) \\ Charles R Greathouse IV, Feb 23 2017
CROSSREFS
Sequence in context: A140602 A067977 A183311 * A185460 A260467 A202421
KEYWORD
nonn,base
AUTHOR
Philip Mizzi, Feb 22 2017
STATUS
approved

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 24 09:18 EDT 2024. Contains 371935 sequences. (Running on oeis4.)