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

A140546 Primes p such that neither p - 6 nor p + 6 is prime.

Original entry on oeis.org

2, 3, 71, 127, 139, 149, 181, 211, 241, 281, 293, 349, 397, 401, 409, 419, 421, 431, 479, 487, 491, 499, 521, 523, 617, 631, 643, 661, 673, 691, 701, 709, 719, 743, 761, 769, 773, 787, 797, 809, 811, 839, 907, 911, 919, 929, 937, 967, 1009, 1021, 1031, 1049
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 30 2008

Keywords

Crossrefs

Cf. A136207 (complement)

Programs

  • Maple
    isA140546 := proc(n)
        if isprime(n) then
            if isprime(n+6) or isprime(n-6) then
                false;
            else
                true;
            end if;
        else
            false ;
        end if;
    end proc:
    A140546 := proc(n)
        option remember;
        local a;
        if n = 1 then
            2 ;
        else
            a := nextprime(procname(n-1)) ;
            while true do
                if isA140546(a) then
                    return a;
                else
                    a := nextprime(a) ;
                end if;
            end do:
        end if;
    end proc:
    seq(A140546(n),n=1..80) ; # R. J. Mathar, Jun 10 2024
  • Mathematica
    Select[Prime[Range[176]],!PrimeQ[#+6]&&(!PrimeQ[#-6]||#<5)&] (* James C. McMahon, Jul 12 2025 *)

Extensions

Corrected and extended by Charles R Greathouse IV, Mar 25 2010

A254041 Number of decompositions of 2n into an unordered sum of two sexy primes.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 2, 1, 2, 3, 2, 2, 3, 1, 3, 4, 2, 2, 4, 2, 3, 5, 3, 3, 5, 2, 4, 6, 2, 4, 6, 2, 4, 6, 4, 3, 6, 4, 3, 7, 4, 3, 8, 3, 4, 7, 3, 4, 7, 4, 5, 7, 5, 5, 9, 5, 5, 12, 4, 4, 10, 3, 5, 7, 4, 5, 6, 5, 6, 8, 4, 5, 9, 2, 5, 8, 3, 5, 8, 4, 4, 9, 6, 4, 9
Offset: 1

Views

Author

Lei Zhou, Jan 23 2015

Keywords

Comments

"Sexy primes" are listed in A136207.
It is conjectured that a(n) > 0 for n > 4.

Examples

			When n = 79, 2n = 158 = 7 + 151 = 19 + 139 = 31 + 127 = 61 + 97 = 79 + 79 has five "two prime decompositions". Among the involved prime numbers 7, 19, 31, 61, 79, 97, 127, 139, 151, prime 127 and 139 are not sexy primes. So only three decompositions, 158 = 7 + 151 = 61 + 97 = 79 + 79 satisfy the definition of this sequence. Thus a(79) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[e = 2 n; ct = 0; p = 2; While[p = NextPrime[p]; p <= n, q = e - p; If[PrimeQ[q], If[(((p > 6) && PrimeQ[p - 6]) || PrimeQ[p + 6]) && (((q > 6) && PrimeQ[q - 6]) || PrimeQ[q + 6]), ct++]]]; ct, {n, 87}]

A136208 Primes p such that p-8 or p+8 is prime.

Original entry on oeis.org

3, 5, 11, 13, 19, 23, 29, 31, 37, 53, 59, 61, 67, 71, 79, 89, 97, 101, 109, 131, 139, 149, 157, 173, 181, 191, 199, 233, 241, 263, 269, 271, 277, 359, 367, 389, 397, 401, 409, 431, 439, 449, 457, 479, 487, 491, 499, 563, 569, 571, 577, 593, 599, 601, 607, 653
Offset: 1

Views

Author

Carlos Alves, Dec 21 2007, Dec 22 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[150]], PrimeQ[ # - 8] || PrimeQ[ # + 8] &] (* Stefan Steinerberger, Dec 22 2007 *)
    Select[Prime[Range[150]],AnyTrue[#+{8,-8},PrimeQ]&] (* Harvey P. Dale, Jul 12 2022 *)

Extensions

More terms from Stefan Steinerberger, Dec 22 2007

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