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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Mar 30 2012 18:35:54
%S 1,2,3,4,9,10,27,57,69,70,267,429,1059,1227,1479,2547,2787,3249,3459,
%T 3537,4089,4719,5097,6267,6357,6567,6957,8997,9039,10089,12039,12819,
%U 13719,16689,16977,17289,17919,18909,19377,19419,19749
%N Ascending sequence of numbers such that the sum of any two distinct elements (even + odd) is a prime number.
%e 70 + 69 = 139 is prime ;
%e 70 + 57 = 127 is prime ;
%e 70 + 9 = 79 is prime ;
%e 70 + 3 = 73 is prime ;
%e 70 + 1 = 71 is prime.
%p with(numtheory):nn:=50: T:=array(1..nn): T[1]:=1:T[2]:=2:a:=2:a0:=1:a1:=1:for
%p k from 3 to nn do:id:=0:for n from k to 20000 while(id=0) do:n1:=irem(n,2):i:=0:for
%p p from 1 to a do: if n=T[p] then i:=0:else fi: x:=n+T[p]:if type(x, prime)=true
%p then i:=i+1:else fi:od: if (i=a1 and n1=0) or (i=a0 and n1=1) then T[k]:=n:a0:=a0+irem(n1+1,2):a1:=a1+n1:printf(`%d, `, n):a:=a+1:id:=1: else fi:od:od:
%K nonn
%O 1,2
%A _Michel Lagneau_, Jan 22 2011