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-2 of 2 results.

A069479 Smallest n-tuply-lonely non-twin prime.

Original entry on oeis.org

23, 1039, 403026797, 121829611399
Offset: 1

Views

Author

Neil Fernandez, Mar 25 2002

Keywords

Comments

a(3) found by Hans Havermann; a(4) by Phil Carmody.

Examples

			An n-tuply lonely non-twin prime is a non-twin prime that is sandwiched between exactly n pairs of prime twins on both sides. a(2)=1039 because 1039 is the first non-twin to be sandwiched between exactly 2 pairs of twins on each side (1019,1021,1031,1033 and 1049,1051,1061,1063).
		

Crossrefs

A227323 Prime(k) such that each of the three preceding and also each of the three following primes are twin primes.

Original entry on oeis.org

11, 1039, 2099, 4253, 9433, 9437, 62983, 62987, 72229, 72251, 91121, 386401, 392269, 392279, 495589, 495611, 626617, 663583, 663587, 754973, 873553, 908857, 909301, 909317, 909319, 909329, 972137, 1006309, 1006331, 1138393, 1138409, 1159201
Offset: 1

Views

Author

Irina Gerasimova, Jul 06 2013

Keywords

Comments

The union of sequences A069456 and A227063.
Prime(k) such that prime(k-i), i=1..3, and prime(k+i), i=1..3 are in A001097.

Programs

  • Maple
    istwp := proc(n)
        if isprime(n) then
            if isprime(n+2) or isprime(n-2) then
                true;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    for i from 4 do
        p := ithprime(i) ;
        p1 := prevprime(p) ;
        if istwp(p1) then
            p2 := prevprime(p1) ;
            if istwp(p2) then
                p3 := prevprime(p2) ;
                if istwp(p3) then
                    p1 := nextprime(p) ;
                    if istwp(p1) then
                        p2 := nextprime(p1) ;
                        if istwp(p2) then
                            p3 := nextprime(p2) ;
                            if istwp(p3) then
                                printf("%d\n",p) ;
                            end if;
                        end if;
                    end if;
                end if;
            end if;
        end if;
    end do: # R. J. Mathar, Jul 13 2013

Extensions

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