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-10 of 66 results. Next

A023201 Primes p such that p + 6 is also prime. (Lesser of a pair of sexy primes.)

Original entry on oeis.org

5, 7, 11, 13, 17, 23, 31, 37, 41, 47, 53, 61, 67, 73, 83, 97, 101, 103, 107, 131, 151, 157, 167, 173, 191, 193, 223, 227, 233, 251, 257, 263, 271, 277, 307, 311, 331, 347, 353, 367, 373, 383, 433, 443, 457, 461, 503, 541, 557, 563, 571, 587, 593, 601, 607, 613, 641, 647
Offset: 1

Views

Author

Keywords

Crossrefs

A031924 (primes starting a gap of 6) and A007529 together give this (A023201).
Cf. A046117 (a(n)+6), A087695 (a(n)+3), A098428, A000040, A010051, A006489 (subsequence).

Programs

  • Haskell
    a023201 n = a023201_list !! (n-1)
    a023201_list = filter ((== 1) . a010051 . (+ 6)) a000040_list
    -- Reinhard Zumkeller, Feb 25 2013
    
  • Magma
    [n: n in [0..40000] | IsPrime(n) and IsPrime(n+6)]; // Vincenzo Librandi, Aug 04 2010
    
  • Maple
    A023201 := proc(n)
        option remember;
        if n = 1 then
            5;
        else
            for a from procname(n-1)+2 by 2 do
                if isprime(a) and isprime(a+6) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, May 28 2013
  • Mathematica
    Select[Range[10^2], PrimeQ[ # ]&&PrimeQ[ #+6] &] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    Select[Prime[Range[120]],PrimeQ[#+6]&] (* Harvey P. Dale, Mar 20 2018 *)
  • PARI
    is(n)=isprime(n+6)&&isprime(n) \\ Charles R Greathouse IV, Mar 20 2013

Formula

From M. F. Hasler, Jan 02 2020: (Start)
a(n) = A046117(n) - 6 = A087695(n) - 3.
A023201 = { p = A000040(k) | A000040(k+1) = p+6 or A000040(k+2) = p+6 } = A031924 U A007529. (End)

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

A087695 Numbers n such that n + 3 and n - 3 are both prime.

Original entry on oeis.org

8, 10, 14, 16, 20, 26, 34, 40, 44, 50, 56, 64, 70, 76, 86, 100, 104, 106, 110, 134, 154, 160, 170, 176, 194, 196, 226, 230, 236, 254, 260, 266, 274, 280, 310, 314, 334, 350, 356, 370, 376, 386, 436, 446, 460, 464, 506, 544, 560, 566, 574, 590, 596
Offset: 1

Views

Author

Zak Seidov, Sep 27 2003

Keywords

Comments

A010051(a(n)-3) * A010051(a(n)+3) = 1. - Reinhard Zumkeller, Nov 17 2015

Crossrefs

Programs

  • Haskell
    a087695 n = a087695_list !! (n-1)
    a087695_list = filter
       (\x -> a010051' (x - 3) == 1 && a010051' (x + 3) == 1) [2, 4 ..]
    -- Reinhard Zumkeller, Nov 17 2015
    
  • Maple
    ZL:=[]:for p from 1 to 600 do if (isprime(p) and isprime(p+6) ) then ZL:=[op(ZL),(p+(p+6))/2]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
  • Mathematica
    lst={};Do[If[PrimeQ[n-3]&&PrimeQ[n+3], AppendTo[lst, n]], {n, 10^3}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 08 2008 *)
    Select[Range[600],AllTrue[#+{3,-3},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 06 2015 *)
  • PARI
    p=2; q=3; forprime(r=5,1e3, if(q-p<7 && (q-p==6 || r-p==6), print1(p+3", ")); p=q; q=r) \\ Charles R Greathouse IV, May 22 2018

Formula

a(n) = A046117(n) - 3.

A046118 Smallest member of a sexy prime triple: value of p 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

7, 17, 31, 47, 67, 97, 101, 151, 167, 227, 257, 271, 347, 367, 557, 587, 607, 647, 727, 941, 971, 1097, 1117, 1181, 1217, 1277, 1291, 1361, 1427, 1447, 1487, 1607, 1657, 1747, 1777, 1867, 1901, 1987, 2131, 2281, 2377, 2411, 2677, 2687, 2707, 2791, 2897, 2957
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 smallest member; e.g., a(4)=47 is the smallest member of the sexy prime triple (47, 53, 59), but is also the second member of the sexy prime quadruple (41, 47, 53, 59). - Daniel Forgues, Aug 05 2009

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(5000) | not IsPrime(p+18) and IsPrime(p+6) and IsPrime(p+12)]; // Vincenzo Librandi, Sep 07 2017
  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p+6]&&PrimeQ[p+12]&&!PrimeQ[p+18], AppendTo[lst, p]], {n, 7!}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)
    Select[Prime[Range[500]],AllTrue[#+{6,12},PrimeQ]&&CompositeQ[#+18]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 11 2019 *)
  • PARI
    lista(nn) = forprime(p=3, nn, if (isprime(p+6) && isprime(p+12) && !isprime(p+18), print1(p, ", "));); \\ Michel Marcus, Jan 06 2015
    

Extensions

Definition edited by Daniel Forgues, Aug 12 2009
More terms from Eric M. Schmidt, Sep 07 2017

A098412 Greatest members p of prime triples (p-6, p-4, p).

Original entry on oeis.org

11, 17, 23, 47, 107, 113, 197, 233, 317, 353, 467, 647, 827, 863, 887, 1097, 1283, 1307, 1433, 1487, 1493, 1613, 1877, 2003, 2087, 2243, 2273, 2663, 2693, 3257, 3467, 3533, 3677, 3923, 4007, 4133, 4523, 4643, 4793, 4937, 4973, 5237, 5483, 5507, 5657, 6203
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 07 2004

Keywords

Comments

Subsequence of A046117; a(n) = A073648(n) + 4 = A022004(n) + 6.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(6500)|IsPrime(p) and IsPrime(p-6) and IsPrime(p-4)]; // Vincenzo Librandi, Dec 26 2010
  • Maple
    K:=10^7: # to get all terms <= K.
    for n from 1 by 2 to K do; if isprime(n-6) and isprime(n-4) and isprime(n) then print(n) else fi; od;  # Muniru A Asiru, Aug 06 2017
  • Mathematica
    Select[Table[Prime[n], {n, 1000}], PrimeQ[# - 4] && PrimeQ[# - 6] &] (* Vladimir Joseph Stephan Orlovsky, Jun 19 2011 *)
    Select[Partition[Prime[Range[1000]],3,1],Differences[#]=={2,4}&][[All,3]] (* Harvey P. Dale, Sep 23 2017 *)

A111192 Product of the n-th sexy prime pair.

Original entry on oeis.org

55, 91, 187, 247, 391, 667, 1147, 1591, 1927, 2491, 3127, 4087, 4891, 5767, 7387, 9991, 10807, 11227, 12091, 17947, 23707, 25591, 28891, 30967, 37627, 38407, 51067, 52891, 55687, 64507, 67591, 70747, 75067, 78391, 96091, 98587, 111547, 122491, 126727, 136891
Offset: 1

Views

Author

Shawn M Moore (sartak(AT)gmail.com), Oct 23 2005

Keywords

Comments

Semiprime of the form 4*m^2-9 = (2*m-3)*(2*m+3). - Vincenzo Librandi, Jan 26 2016

Examples

			a(2)=91 because the second sexy prime pair is (7, 13) and 7*13=91.
		

Crossrefs

Cf. A037074, A143206, A195118; intersection of A143205 and A001358.

Programs

  • Haskell
    a111192 n = a111192_list !! (n-1)
    a111192_list = f a000040_list where
       f (p:ps@(q:r:_)) | q - p == 6 = (p*q) : f ps
                        | r - p == 6 = (p*r) : f ps
                        | otherwise  = f ps
    -- Reinhard Zumkeller, Sep 13 2011
    
  • Magma
    IsSemiprime:=func; [s: n in [1..300] | IsSemiprime(s) where s is 4*n^2-9]; // Vincenzo Librandi, Jan 26 2016
  • Mathematica
    #(#+6)&/@Select[Prime[Range[100]], PrimeQ[#+6]&] (* Harvey P. Dale, Dec 17 2010 *)
    (* For checking large numbers, the following code is better. For instance, we could use the fQ function to determine that 229031718473564142083 is not in this sequence. *) fQ[n_] := Block[{fi = FactorInteger[n]}, Last@# & /@ fi == {1, 1} && Differences[ First@# & /@ fi] == {6}]; Select[ Range[125000], fQ] (* Robert G. Wilson v, Feb 08 2012 *)
    Select[Table[4 n^2 - 9, {n, 300}], PrimeOmega[#] == 2 &] (* Vincenzo Librandi, Jan 26 2016 *)

Formula

a(n) = A023201(n) * A046117(n). - Reinhard Zumkeller, Sep 13 2011

A098413 Greatest members p of prime triples (p-6, p-2, p).

Original entry on oeis.org

13, 19, 43, 73, 103, 109, 199, 229, 283, 313, 463, 619, 829, 859, 883, 1093, 1303, 1429, 1453, 1489, 1669, 1699, 1789, 1873, 1879, 1999, 2089, 2143, 2383, 2689, 2713, 2803, 3169, 3259, 3463, 3469, 3853, 4159, 4519, 4789, 5233, 5419, 5443, 5653, 5659, 5743
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 07 2004

Keywords

Comments

Subsequence of A046117; a(n) = A073649(n) + 2 = A022005(n) + 6.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(6500)|IsPrime(p) and IsPrime(p-6) and IsPrime(p-2)]; // Vincenzo Librandi, Dec 26 2010
  • Mathematica
    Transpose[Select[Partition[Prime[Range[800]],3,1],Differences[#] == {4,2}&]][[3]] (* Harvey P. Dale, Aug 21 2013 *)

A103206 Concatenations of pairs of primes that differ by 6.

Original entry on oeis.org

511, 713, 1117, 1319, 1723, 2329, 3137, 3743, 4147, 4753, 5359, 6167, 6773, 7379, 8389, 97103, 101107, 103109, 107113, 131137, 151157, 157163, 167173, 173179, 191197, 193199, 223229
Offset: 0

Views

Author

Jonathan Vos Post, Mar 19 2005

Keywords

Comments

Prime in this sequence: a(3) = 1117, a(4) = 1319, a(5) = 1723, a(7) = 3137, a(15) = 8389, a(16) = 97103, a(17) = 101107, a(21) = 151157, a(22) = 157163, a(23) = 167173, a(27) = 223229. Semiprimes in this sequence: a(1) = 511 = 7 x 73, a(2) = 713 = 23 * 31, a(6) = 2329 = 17 * 137, a(8) = 3743 = 19 * 197, a(11) = 5359 = 23 * 233, a(12) = 6167 = 7 * 881, a(13) = 6773 = 13 * 521, a(14) = 7379 = 47 x 157, a(18) = 103109 = 23 * 4483, a(20) = 131137 = 71 * 1847, a(26) = 193199 = 43 * 4493, ... Note that a(9) = 4147 = 11 * 13 * 29 and a(19) = 107113 = 43 * 47 * 53 are the products of three primes with the same number of digits.

Crossrefs

Programs

  • Mathematica
    FromDigits[Flatten[IntegerDigits/@{#,#+6}]]&/@Select[Prime[Range[50]], PrimeQ[#+6]&] (* Harvey P. Dale, Jun 24 2015 *)

Formula

a(n) = A023201(n) concatenated with A023201(n)+6.

A160370 Smaller member p of a pair (p,p+6) of consecutive primes in different centuries.

Original entry on oeis.org

1097, 2897, 3797, 4597, 5297, 5897, 9397, 11497, 11897, 12197, 12497, 12697, 15797, 16097, 18797, 19597, 21997, 24097, 24197, 28597, 28697, 29297, 30097, 30197, 30697, 32497, 35597, 36997, 39097, 40897, 41597, 41897, 42397, 45497, 47297
Offset: 1

Views

Author

Ki Punches, May 11 2009

Keywords

Comments

Note that the smaller member of a pair of sexy primes with the same constraint on centuries defines a different sequence, since members of a sexy prime pair do not need to be *consecutive* primes.
The larger member in the pair is obtained by adding 6 to an entry.
Every a(n)+3 is a multiple of 100 such that neither a(n)+2 nor a(n)+4 are primes. It appears that every integer occurs as the difference round((a(n+1)-a(n))/100); all numbers 1..333 occur as these differences for a(n) < 1000000000. - Hartmut F. W. Hoft, May 18 2017

Examples

			30097 + 6 = 30103.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[5000]],2,1],#[[2]]-#[[1]] == 6 && Floor[#[[1]]/100]!=Floor[#[[2]]/100]&]][[1]] (* Harvey P. Dale, Apr 28 2012 *)
    a160370[n_] := Select[Range[97, n, 100], AllTrue[# + {0, 6}, PrimeQ] && NoneTrue[# + {2, 4}, PrimeQ]&]
    a160370[49000] (* data *) (* Hartmut F. W. Hoft, May 18 2017 *)

Formula

{A031924(n): [A031924(n)/100] <> [A031925(n)/100]} where [..]=floor(..).

Extensions

Edited by R. J. Mathar, May 14 2009

A092146 Primes of the form p + 10 where p is a prime.

Original entry on oeis.org

13, 17, 23, 29, 41, 47, 53, 71, 83, 89, 107, 113, 137, 149, 167, 173, 191, 233, 239, 251, 281, 293, 317, 347, 359, 383, 389, 419, 431, 443, 449, 467, 509, 557, 587, 617, 641, 653, 683, 701, 719, 743, 761, 797, 821, 839, 863, 887, 929, 947, 977, 1019, 1031
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Mar 31 2004

Keywords

Crossrefs

Programs

Formula

a(n) = 10 + A023203(n). - Alois P. Heinz, Feb 27 2020
Showing 1-10 of 66 results. Next