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

A023271 Primes p such that p, p+6, p+12, p+18 are all primes.

Original entry on oeis.org

5, 11, 41, 61, 251, 601, 641, 1091, 1481, 1601, 1741, 1861, 2371, 2671, 3301, 3911, 4001, 5101, 5381, 5431, 5641, 6311, 6361, 9461, 11821, 12101, 12641, 13451, 14621, 14741, 15791, 15901, 17471, 18211, 19471, 20341, 21481, 23321, 24091, 26171, 26681
Offset: 1

Views

Author

Keywords

Comments

Smallest member of a "sexy" prime quadruple.
For n > 1, a(n) ends in 1. - Robert Israel, Jul 16 2015
The only sexy prime quintuple corresponding to (p, p+6, p+12, p+18, p+24) starts with a(1) = 5, so this quintuple is (5, 11, 17, 23, 29) (see Wikipedia link and A206039). - Bernard Schott, Mar 10 2023

Crossrefs

Programs

  • Magma
    [p: p in PrimesInInterval(2, 1000000) | forall{i: i in [ 6, 12, 18] | IsPrime(p+i)}]; // Vincenzo Librandi, Jul 15 2015
    
  • Maple
    for a to 2*10^5 do
    if `and`(isprime(a), isprime(a+6), isprime(a+12), isprime(a+18))
    then print(a);
    end if;
    end do;
    # code produces 109 primes
    # Matt C. Anderson, Jul 15 2015
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[# + 6] && PrimeQ[# + 12] && PrimeQ[# + 18] &] (* Vincenzo Librandi, Jul 15 2015 *)
    (* The following program uses the AllTrue function from Mathematica version 10 *) Select[Prime[Range[3000]], AllTrue[# + {6, 12, 18}, PrimeQ] &] (* Harvey P. Dale, Jun 06 2017 *)
  • PARI
    main(size)=my(v=vector(size),i,r=1,p);for(i=1,size,while(1,p=prime(r);if(isprime(p+6)&&isprime(p+12)&&isprime(p+18),v[i]=p;r++;break,r++))); v \\ Anders Hellström, Jul 16 2015

Extensions

Edited by N. J. A. Sloane, Aug 04 2009 following a suggestion from Daniel Forgues

A046122 Second member of a sexy prime quadruple: value of p+6 such that p, p+6, p+12 and p+18 are all prime.

Original entry on oeis.org

11, 17, 47, 67, 257, 607, 647, 1097, 1487, 1607, 1747, 1867, 2377, 2677, 3307, 3917, 4007, 5107, 5387, 5437, 5647, 6317, 6367, 9467, 11827, 12107, 12647, 13457, 14627, 14747, 15797, 15907, 17477, 18217, 19477, 20347, 21487, 23327, 24097
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p+6]&&PrimeQ[p+12]&&PrimeQ[p+18], AppendTo[lst, p+6]], {n, 8!}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)

Formula

a(n) = 6 + A023271(n) = A046123(n) - 6. - R. J. Mathar, Jun 28 2012

A046124 Last member of a sexy prime quadruple: value of p+18 such that p, p+6, p+12 and p+18 are all prime.

Original entry on oeis.org

23, 29, 59, 79, 269, 619, 659, 1109, 1499, 1619, 1759, 1879, 2389, 2689, 3319, 3929, 4019, 5119, 5399, 5449, 5659, 6329, 6379, 9479, 11839, 12119, 12659, 13469, 14639, 14759, 15809, 15919, 17489, 18229, 19489, 20359, 21499, 23339, 24109
Offset: 1

Views

Author

Eric W. Weisstein, Dec 11 1999

Keywords

Crossrefs

Programs

  • Magma
    [p+18: p in PrimesUpTo(30000) | IsPrime(p+6) and IsPrime(p+12) and IsPrime(p+18)]; // Vincenzo Librandi, Jan 07 2015
  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p+6]&&PrimeQ[p+12]&&PrimeQ[p+18], AppendTo[lst, p+18]], {n, 8!}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)

Formula

a(n) = A023271(n)+18 = A046122(n)+12 = A046123(n)+6. - Michel Marcus, Jan 06 2015

A163857 Number of sexy prime quadruples (p, p+6, p+12, p+18), with p <= n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1

Views

Author

Daniel Forgues, Aug 05 2009

Keywords

Comments

There are 2 sexy prime quadruples classes, (-1, -1, -1, -1) (mod 6) and (+1, +1, +1, +1) (mod 6). They should asymptotically have the same number of quadruples, if there is an infinity of such quadruples, although with a Chebyshev bias expected against the quadratic residue class quadruples (+1, +1, +1, +1) (mod 6), which doesn't affect the asymptotic result. This sequence counts both classes.
Also the sexy prime quadruples of class (-1, -1, -1, -1) (mod 6) are (11, 17, 23, 29) (mod 30) while the sexy prime quadruples of class (+1, +1, +1, +1) (mod 6) are (1, 7, 13, 19) (mod 30).
Except for (5, 11, 17, 23, 29), there is no sexy prime quintuples (p, p+6, p+12, p+18, p+24) since one of the members is then divisible by 5.

Crossrefs

A023271 First member of a sexy prime quadruple: value of p where (p, p+6, p+12, p+18) are all prime.
A046122 Second member of a sexy prime quadruple: value of p+6 where (p, p+6, p+12, p+18) are all prime.
A046123 Third member of a sexy prime quadruple: value of p+12 where (p, p+6, p+12, p+18) are all prime.
A046124 Last member of a sexy prime quadruple: value of p+18 where (p, p+6, p+12, p+18) are all prime.

A372042 Monogamously Faithful Primes (primes that are sexy primes with only one other prime in their pair).

Original entry on oeis.org

83, 89, 131, 137, 191, 193, 197, 199, 223, 229, 307, 311, 313, 317, 331, 337, 383, 389, 433, 439, 443, 449, 457, 461, 463, 467, 503, 509, 541, 547, 571, 577, 677, 683, 751, 757, 821, 823, 827, 829, 853, 857, 859, 863, 877, 881, 883, 887, 991, 997, 1013, 1019, 1033, 1039, 1063, 1069, 1087
Offset: 0

Views

Author

Ryan Stoler, Apr 17 2024

Keywords

Comments

These are all the numbers found in A136207 but not found in A046118, A046119, A046120, A023271, A046122, A046123, or A046124, i.e., members of a sexy prime pair but not members of sexy prime triplets, quadruplets, ...

Examples

			83 and 89 are "sexy" with each other, because they differ by 6. They are monogamously faithful, because neither is sexy with any other number.
71 is not "sexy" because it is not in A136207.
67 is "sexy" with both 61 and 73. Therefore, it is not monogamously faithful, since it has multiple numbers that it is sexy with.
43 is "sexy" only with 37. But it is not monogamously faithful, even though it isn't sexy with another number, because 37 is also "sexy" with 31, therefore "cheating" on 43 with 31.
		

Crossrefs

Programs

  • Maple
    isA372042 := proc(n)
        if isprime(n) then
            if isprime(n+6) then
                if not isprime(n-6) and not isprime(n+12) then
                    true;
                else
                    false;
                end if;
            elif isprime(n-6) then
                if not isprime(n+6) and not isprime(n-12) then
                    true;
                else
                    false;
                end if;
            else
                false ;
            end if;
        else
            false ;
        end if;
    end proc:
    A372042 := proc(n)
        option remember;
        local a;
        if n = 1 then
            83 ;
        else
            a := nextprime(procname(n-1)) ;
            while true do
                if isA372042(a) then
                    return a;
                else
                    a := nextprime(a) ;
                end if;
            end do:
        end if;
    end proc:
    seq(A372042(n),n=1..80) ; # R. J. Mathar, Jun 10 2024
Showing 1-5 of 5 results.