cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A038609 Numbers that are the sum of 2 different primes.

This page as a plain text file.
%I A038609 #12 Mar 23 2020 15:55:43
%S A038609 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 A038609 36,38,39,40,42,43,44,45,46,48,49,50,52,54,55,56,58,60,61,62,63,64,66,
%U A038609 68,69,70,72,73,74,75,76,78,80,81,82,84,85,86,88,90,91,92
%N A038609 Numbers that are the sum of 2 different primes.
%H A038609 R. J. Mathar, <a href="/A038609/b038609.txt">Table of n, a(n) for n = 1..9225</a>
%p A038609 isA038609 := proc(n)
%p A038609     local i,p,q;
%p A038609     for i from 1 do
%p A038609         p := ithprime(i) ;
%p A038609         if 2*p > n then
%p A038609             return false;
%p A038609         fi;
%p A038609         q := n-p ;
%p A038609         if q <= p then
%p A038609             return false ;
%p A038609         end if;
%p A038609         if isprime(q) then
%p A038609             return true;
%p A038609         end if;
%p A038609     end do:
%p A038609 end proc:
%p A038609 n :=1 :
%p A038609 for c from 1 do
%p A038609     if isA038609(c) then
%p A038609         printf("%d %d\n",n,c) ;
%p A038609         n := n+1 ;
%p A038609     end if;
%p A038609 end do: # _R. J. Mathar_, Jun 09 2014
%t A038609 max = 100;
%t A038609 ip = PrimePi[max];
%t A038609 Table[Prime[i] + Prime[j], {i, ip}, {j, i + 1, ip}] // Flatten // Union // Select[#, # <= max&]& (* _Jean-François Alcover_, Mar 23 2020 *)
%Y A038609 Cf. A014091, A166081 (complement).
%K A038609 nonn
%O A038609 1,1
%A A038609 Vasiliy Danilov (danilovv(AT)usa.net) 1998 Jul