A180743 Ascending sequence of numbers such that the sum of any two distinct elements (even + odd) is a prime number.
1, 2, 3, 4, 9, 10, 27, 57, 69, 70, 267, 429, 1059, 1227, 1479, 2547, 2787, 3249, 3459, 3537, 4089, 4719, 5097, 6267, 6357, 6567, 6957, 8997, 9039, 10089, 12039, 12819, 13719, 16689, 16977, 17289, 17919, 18909, 19377, 19419, 19749
Offset: 1
Keywords
Examples
70 + 69 = 139 is prime ; 70 + 57 = 127 is prime ; 70 + 9 = 79 is prime ; 70 + 3 = 73 is prime ; 70 + 1 = 71 is prime.
Programs
-
Maple
with(numtheory):nn:=50: T:=array(1..nn): T[1]:=1:T[2]:=2:a:=2:a0:=1:a1:=1:for 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 from 1 to a do: if n=T[p] then i:=0:else fi: x:=n+T[p]:if type(x, prime)=true 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: