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.

Showing 1-1 of 1 results.

A227421 Primes p such that 2*p = prime(m) + prime(m + k) for some k > 2, where prime(m) and p or p and prime(m + k) are consecutive primes.

Original entry on oeis.org

7, 23, 37, 47, 67, 73, 233, 277, 353, 479, 613, 619, 631, 647, 809, 1009, 1069, 1097, 1283, 1297, 1433, 1453, 1459, 1471, 1493, 1499, 1607, 1613, 1663, 1709, 1721, 1759, 1783, 1789, 1867, 1889, 1901, 1931, 1993, 2099, 2137, 2161, 2377, 2383, 2411, 2521, 2621
Offset: 1

Views

Author

Irina Gerasimova, Jul 11 2013

Keywords

Comments

This is the middle prime q in a prime triple p < q=(p+r)/2 < r such that either (p,q) are two consecutive primes or (q,r) are two consecutive primes, but (p,q,r) are not three consecutive primes.

Examples

			In the ordered set of primes we have ...,607, 613, 617, 619, 631,... and (607 + 631)/2 = 619, where 619 and 631 are consecutive primes, therefore 619 is in this sequence.
		

Crossrefs

Cf. A098029.

Programs

  • Maple
    for i from 2 to 400 do
        p := ithprime(i) ;
        pn := prevprime(p) ;
        pk := 2*p-pn ;
        if isprime(pk) and pk > nextprime(p) then
            printf("%d,",p) ;
        else
            pk := nextprime(p) ;
            pn := 2*p-pk ;
            if isprime(pn) and pn < prevprime(p) then
                printf("%d,",p) ;
            end if;
        end if;
    end do: # R. J. Mathar, Jul 20 2013

Extensions

Corrected by R. J. Mathar, Jul 20 2013
Showing 1-1 of 1 results.