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!)
A038609 Numbers that are the sum of 2 different primes. 16

%I #12 Mar 23 2020 15:55:43

%S 5,7,8,9,10,12,13,14,15,16,18,19,20,21,22,24,25,26,28,30,31,32,33,34,

%T 36,38,39,40,42,43,44,45,46,48,49,50,52,54,55,56,58,60,61,62,63,64,66,

%U 68,69,70,72,73,74,75,76,78,80,81,82,84,85,86,88,90,91,92

%N Numbers that are the sum of 2 different primes.

%H R. J. Mathar, <a href="/A038609/b038609.txt">Table of n, a(n) for n = 1..9225</a>

%p isA038609 := proc(n)

%p local i,p,q;

%p for i from 1 do

%p p := ithprime(i) ;

%p if 2*p > n then

%p return false;

%p fi;

%p q := n-p ;

%p if q <= p then

%p return false ;

%p end if;

%p if isprime(q) then

%p return true;

%p end if;

%p end do:

%p end proc:

%p n :=1 :

%p for c from 1 do

%p if isA038609(c) then

%p printf("%d %d\n",n,c) ;

%p n := n+1 ;

%p end if;

%p end do: # _R. J. Mathar_, Jun 09 2014

%t max = 100;

%t ip = PrimePi[max];

%t Table[Prime[i] + Prime[j], {i, ip}, {j, i + 1, ip}] // Flatten // Union // Select[#, # <= max&]& (* _Jean-François Alcover_, Mar 23 2020 *)

%Y Cf. A014091, A166081 (complement).

%K nonn

%O 1,1

%A Vasiliy Danilov (danilovv(AT)usa.net) 1998 Jul

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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)