# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a185250
Showing 1-1 of 1
%I A185250 #26 Sep 03 2013 23:55:52
%S A185250 2,7,23,67,61,83,107,829,109,809,127,827,163,683,163,863,167,283,167,
%T A185250 823,181,881,211,887,223,677,227,277,227,727,239,607,241,587,241,857,
%U A185250 251,487,263,367,263,673,269,307,271,827,283,617,283,761,293,607,383,661
%N A185250 Array A(n,k), n > 0, k = 1,2 read by rows such that (A(n,1), A(n,2)) are the pairs of primes (p, q), p < q, where the decimal digits of q are the 9's complement of the decimal digits of p.
%C A185250 The prime p in the pair (p, q) is not unique; for example, the prime 163 generates two pairs of primes: (163, 683) and (163, 863).
%H A185250 Michel Lagneau, Table of (p, q) for 5000 pairs
%e A185250 (241, 587) and (241, 857) are in the sequence because the digits 5, 8, 7 are the 9's complement of the decimal digits of 241.
%p A185250 with(numtheory):
%p A185250 for n from 1 to 200 do:
%p A185250 p1:=ithprime(n)
%p A185250 for k from n+1 to 2000 do:
%p A185250 p2:=ithprime(k):
%p A185250 x1:=convert(p1,base,10):n1:=nops(x1):
%p A185250 x2:=convert(p2,base,10):n2:=nops(x2):
%p A185250 if n1=n2 then
%p A185250 W:=array(1..n1):U:=array(1..n1):U1:=array(1..n1):
%p A185250 for c from 1 to n1 do:
%p A185250 U1[c]:=x1[c]:od:U:=sort(x1,`<`):V:=sort(x2,`>`):
%p A185250 for j from 1 to n1 do:
%p A185250 W[j]:= 9-V[j]:od:W1:=sort(W,`>`):jj:=0:
%p A185250 for b from 1 to n1 do:
%p A185250 if U[b]=W1[b] then jj:=jj+1:
%p A185250 else
%p A185250 fi:
%p A185250 od:
%p A185250 if jj=n1 and p1