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

A046119 Middle member of a sexy prime triple: value of p+6 such that p, p+6 and p+12 are all prime, but p+18 is not (although p-6 might be).

Original entry on oeis.org

13, 23, 37, 53, 73, 103, 107, 157, 173, 233, 263, 277, 353, 373, 563, 593, 613, 653, 733, 947, 977, 1103, 1123, 1187, 1223, 1283, 1297, 1367, 1433, 1453, 1493, 1613, 1663, 1753, 1783, 1873, 1907, 1993, 2137, 2287, 2383, 2417, 2683, 2693, 2713
Offset: 1

Views

Author

Keywords

Comments

p-6 will be prime if the prime triple contains the last 3 primes of a sexy prime quadruple.
If a sexy prime triple happens to include the last 3 members of a sexy prime quadruple, this sequence will contain the sexy prime triple's middle member; e.g., a(4)=53 is the middle member of the sexy prime triple (47, 53, 59), but is also the third member of the sexy prime quadruple (41, 47, 53, 59). - Daniel Forgues, Aug 05 2009

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p+6]&&PrimeQ[p+12]&&!PrimeQ[p+18], AppendTo[lst, p+6]], {n, 7!}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)
    Select[Prime[Range[400]],And@@PrimeQ[{#-6,#+6}]&&!PrimeQ[#+12]&] (* Harvey P. Dale, Nov 01 2011 *)

Formula

a(n) = A046118(n) + 6. - Michel Marcus, Jan 06 2015

Extensions

Definition edited by Daniel Forgues, Aug 12 2009

A046120 Largest member of a sexy prime triple; value of p+12 where p, p+6 and p+12 are all prime, but p+18 is not.

Original entry on oeis.org

19, 29, 43, 59, 79, 109, 113, 163, 179, 239, 269, 283, 359, 379, 569, 599, 619, 659, 739, 953, 983, 1109, 1129, 1193, 1229, 1289, 1303, 1373, 1439, 1459, 1499, 1619, 1669, 1759, 1789, 1879, 1913, 1999, 2143, 2293, 2389, 2423, 2689, 2699, 2719
Offset: 1

Views

Author

Keywords

Comments

If a sexy prime triple happens to include the last 3 members of a sexy prime quadruple, this sequence will contain the sexy prime triple's largest member; e.g., a(4)=59 is the largest member of the sexy prime triple (47, 53, 59), but is the fourth member of the sexy prime quadruple (41, 47, 53, 59). - Daniel Forgues, Aug 05 2009

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p+6]&&PrimeQ[p+12]&&!PrimeQ[p+18], AppendTo[lst, p+12]], {n, 7!}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)
    #+12&/@Select[Prime[Range[400]],PrimeQ[#+{6,12,18}]=={True,True,False}&] (* Harvey P. Dale, Dec 08 2012 *)

Formula

a(n) = A046118(n)+12 and a(n) = A046119(n)+6. - Michel Marcus, Jan 06 2015

A275681 Table read by rows: list of sexy prime triples (p, p+6, p+12) such that p+18 is composite.

Original entry on oeis.org

7, 13, 19, 17, 23, 29, 31, 37, 43, 47, 53, 59, 67, 73, 79, 97, 103, 109, 101, 107, 113, 151, 157, 163, 167, 173, 179, 227, 233, 239, 257, 263, 269, 271, 277, 283, 347, 353, 359, 367, 373, 379, 557, 563, 569, 587, 593, 599, 607, 613, 619, 647, 653, 659, 727, 733, 739
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 05 2016

Keywords

Examples

			The table starts:
7, 13, 19;
17, 23, 29;
31, 37, 43;
...
		

Crossrefs

Cf. A023201 (sexy primes), A046118, A123082, A275682.

Programs

  • Magma
    lst:=[]; for p in PrimesUpTo(727) do b:=p+6; if IsPrime(b) then c:=b+6; if IsPrime(c) and not IsPrime(c+6) then lst:=lst cat [p, b, c]; end if; end if; end for; lst;
  • Maple
    N:= 10^4: # to get all entries <= N
    Primes:= select(isprime,{seq(i,i=1..N+18,2)}):
    S:= select(`<=`, Primes,N) intersect map(t -> t-6, Primes) intersect map(t -> t-12, Primes) minus map(t -> t-18, Primes):
    map(t ->(t,t+6,t+12), sort(convert(S,list))); # Robert Israel, Aug 05 2016
  • Mathematica
    Most[#]&/@Select[Table[n+{0,6,12,18},{n,Prime[Range[200]]}],PrimeQ[#] == {True,True,True,False}&]//Flatten (* Harvey P. Dale, Jan 19 2017 *)

Formula

a(3*n-2) = A046118(n).
a(3*n-1) = A046118(n)+6.
a(3*n) = A046118(n)+12.

A163858 Number of sexy prime triples (p, p+6, p+12) where p+18 is not prime (although p-6 might be), with p <= n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7
Offset: 1

Views

Author

Daniel Forgues, Aug 05 2009, Aug 12 2009

Keywords

Comments

p-6 will be prime if the prime triple contains the last 3 primes of a sexy prime quadruple.
There are two sexy prime triples classes, (-1, -1, -1) (mod 6) and (+1, +1, +1) (mod 6). They should asymptotically have the same number of triples, if there is an infinity of such triples, although with a Chebyshev bias expected against the quadratic residue class triples (+1, +1, +1) (mod 6), which doesn't affect the asymptotic result. This sequence counts both classes.
Also the sexy prime triples of class (-1, -1, -1) (mod 6) fall within (11, 17, 23, 29) (mod 30) while the sexy prime triples of class (+1, +1, +1) (mod 6) fall within (1, 7, 13, 19) (mod 30).

Crossrefs

A046118 Smallest member of a sexy prime triple: value of p where (p, p+6, p+12) are all prime but p+18 is not (although p-6 might be.)
A046119 Middle member of a sexy prime triple: value of p+6 where (p, p+6, p+12) are all prime but p+18 is not (although p-6 might be.)
A046120 Largest member of a sexy prime triple, value of p+12 where (p, p+6, p+12) are all prime but p+18 is not (although p-6 might be.)

A286217 Product of the n-th sexy prime triple.

Original entry on oeis.org

1729, 11339, 49321, 146969, 386389, 1089019, 1221191, 3864241, 5171489, 12640949, 18181979, 21243961, 43974269, 51881689, 178433279, 208506509, 230324329, 278421569, 393806449, 849244031, 932539661, 1341880019, 1416207439, 1672403471, 1829232539, 2111885999
Offset: 1

Views

Author

Connor Zapfel, May 04 2017

Keywords

Comments

A sexy prime triple is such that p, p+6, and p+12 are primes but p+18 is not a prime. - Harvey P. Dale, Oct 13 2024

Examples

			The first sexy prime triple is (7, 13, 19) so a(1) = 7*13*19 = 1729.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 500, PrimeQ[# + {6, 12, 18}] == {True, True, False} &] // # (#+6) (#+12) & (* Giovanni Resta, May 05 2017 *)
    Times@@Take[#,3]&/@(Select[Table[p+{0,6,12,18},{p,Prime[Range[250]]}],Boole[PrimeQ[#]]=={1,1,1,0}&]) (* Harvey P. Dale, Oct 13 2024 *)

Formula

a(n) = s(n)*(s(n)+6)*(s(n)+12), where s = A046118.
a(n) = A046118(n) * A046119(n) * A046120(n).

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

A275686 Difference between the smallest 10^n-digit member of a sexy prime triple and 10^(10^n - 1).

Original entry on oeis.org

6, 427, 264607, 4975694077
Offset: 0

Views

Author

Arkadiusz Wesolowski, Aug 05 2016

Keywords

Crossrefs

Cf. A046118.

A297847 Sexiness of p = prime(n): number of iterations of the function f(x) = x + 6 that leave p prime.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Jan 07 2018

Keywords

Comments

a(n) > 0 iff p is a term of A023201.
a(n) = 0 iff p is a term of A140555.
a(n) = 2 iff p is a term of A046118.
a(n) > 2 iff p is a term of A023271.
a(n) < 4 except for n = 3. Proof: The last digits of the numbers in the progression repeat 1, 7, 3, 9, 5, 1, 7, 3, 9, 5, ..., so a(n) is at most 4, which only happens for p = 5, since A007652(n) = 5 only for n = 3.

Examples

			For n = 13: prime(13) = 41 and 41 remains prime through exactly 3 iterations of f(x) = x + 6, since 47, 53 and 59 are prime, but 65 is composite, so a(13) = 3.
		

Crossrefs

Programs

  • Mathematica
    Array[-2 + Length@ NestWhileList[# + 6 &, Prime@ #, PrimeQ] &, 105] (* Michael De Vlieger, Jan 11 2018 *)
  • PARI
    a(n) = my(p=prime(n), x=p, i=0); while(1, x=x+6; if(!ispseudoprime(x), return(i), i++))

A358572 Smallest prime p in a sexy prime triple such that (p-3)/2 is also the smallest prime in a sexy prime triple (A023241).

Original entry on oeis.org

17, 97, 1117, 1217, 2897, 130337, 188857, 207997, 221197, 324517, 610817, 900577, 1090877, 1452317, 1719857, 1785097, 2902477, 3069917, 3246317, 4095097, 4536517, 4977097, 5153537, 5517637, 5745557, 6399677, 7168277, 7351957, 7588697, 7661077, 8651537, 8828497, 9153337
Offset: 1

Views

Author

Lamine Ngom, Nov 23 2022

Keywords

Comments

Also numbers m such that m-4, m-1, m+5, m+8, m+11 and m+20 cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
Subsequence of A358571.
Number of terms < 10^k: 0, 2, 2, 5, 5, 12, 34, 150, 655, ...
All terms p and (p-3)/2 have a final decimal digit of 7. This follows from considering possibilities modulo 10 and implies p + 18 and (p-3)/2 + 18 are divisible by 5 and hence composite. Both p and (p-3)/2 are therefore also terms of A046118. - Andrew Howroyd, Dec 31 2022

Examples

			97 is the smallest prime in the sexy prime triple (97, 103, 109), and the triple (47 = (97 - 3)/2, 47 + 6, 47 + 12) forms another sexy prime triple. Hence 97 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[700000]], AllTrue[Join[# + {6,12}, (#-3)/2 + {0, 6, 12}], PrimeQ] &] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    istriple(p)={isprime(p) && isprime(p+6) && isprime(p+12)}
    isok(p)={istriple(p) && istriple((p-3)/2)}
    { forprime(p=1,10^7,if(isok(p), print1(p, ", "))) } \\ Andrew Howroyd, Dec 30 2022
Showing 1-9 of 9 results.