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.

Original entry on oeis.org

5, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 28, 30, 31, 32, 33, 34, 36, 38, 39, 40, 42, 43, 44, 45, 46, 48, 49, 50, 52, 54, 55, 56, 58, 60, 61, 62, 63, 64, 66, 68, 69, 70, 72, 73, 74, 75, 76, 78, 80, 81, 82, 84, 85, 86, 88, 90, 91, 92
Offset: 1

Views

Author

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

Keywords

Crossrefs

Cf. A014091, A166081 (complement).

Programs

  • Maple
    isA038609 := proc(n)
        local i,p,q;
        for i from 1 do
            p := ithprime(i) ;
            if 2*p > n then
                return false;
            fi;
            q := n-p ;
            if q <= p then
                return false ;
            end if;
            if isprime(q) then
                return true;
            end if;
        end do:
    end proc:
    n :=1 :
    for c from 1 do
        if isA038609(c) then
            printf("%d %d\n",n,c) ;
            n := n+1 ;
        end if;
    end do: # R. J. Mathar, Jun 09 2014
  • Mathematica
    max = 100;
    ip = PrimePi[max];
    Table[Prime[i] + Prime[j], {i, ip}, {j, i + 1, ip}] // Flatten // Union // Select[#, # <= max&]& (* Jean-François Alcover, Mar 23 2020 *)