The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A088092 Palindromic primes p such that if each digit d is replaced by 10-d then the resulting palindrome is also a prime. 1

%I

%S 3,5,7,181,191,313,353,383,727,757,797,919,929,12421,12721,14341,

%T 17971,32323,78787,93139,96769,98389,98689,1129211,1145411,1153511,

%U 1175711,1178711,1183811,1221221,1273721,1328231,1486841,1633361,1824281

%N Palindromic primes p such that if each digit d is replaced by 10-d then the resulting palindrome is also a prime.

%C Digit 0 is not allowed. - _Robert Israel_, Sep 14 2020

%H Robert Israel, <a href="/A088092/b088092.txt">Table of n, a(n) for n = 1..10000</a>

%e 181 is a member as replacing 1 by 10-1 = 9 and 8 by 10-8 =2 gives 929 which is also a prime.

%p R:= NULL: count:= 0:

%p for d from 1 by 2 while count < 100 do

%p m:= ceil(d/2);

%p for r from 0 to 9^m-1 do

%p L:= convert(9^m+r,base,9)[1..m] + [1\$m];

%p L:= [ seq(L[-i],i=1..m-1),op(L)];

%p x:= add(L[i]*10^(i-1),i=1..d);

%p if isprime(x) and isprime((10^d-1)*10/9-x) then R:= R, x; count:= count+1

%p fi

%p od od:

%p R; # _Robert Israel_, Sep 14 2020

%Y Cf. A002385 (palindromic primes).

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Sep 23 2003

%E Corrected and extended by _David Wasserman_, Jul 18 2005

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.

Last modified April 17 08:40 EDT 2021. Contains 343064 sequences. (Running on oeis4.)