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.

Previous Showing 11-20 of 66 results. Next

A098428 Number of sexy prime pairs (p, p+6) with p <= n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 07 2004

Keywords

Comments

Since there are 2 congruence classes of sexy prime pairs, (-1, -1) (mod 6) and (+1, +1) (mod 6), the number of sexy prime pairs up to n is the sum of the number of sexy prime pairs for each class, expected to be asymptotically the same for both (with the expected Chebyshev bias against the quadratic residue class (+1, +1) (mod 6), which doesn't affect the asymptotic distribution among the 2 classes). - Daniel Forgues, Aug 05 2009

Examples

			The first sexy prime pairs are: (5,11), (7,13), (11,17), (13,19), ...
therefore the sequence starts: 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 4, ...
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[If[PrimeQ[n]&&PrimeQ[n+6],1,0],{n,100}]] (* Harvey P. Dale, Feb 08 2015 *)
  • PARI
    apply( {A098428(n,o=2,q=o,c)=forprime(p=1+q, n+6, (o+6==p)+((o=q)+6==q=p) && c++);c}, [1..99]) \\ M. F. Hasler, Jan 02 2020
    [#[p:p in PrimesInInterval(1,n)| IsPrime(p+6)]:n in [1..100]]; // Marius A. Burtea, Jan 03 2020

Formula

a(n) = # { p in A023201 | p <= n } = number of elements in intersection of A023201 and [1,n]. - M. F. Hasler, Jan 02 2020

Extensions

Edited by Daniel Forgues, Aug 01 2009, M. F. Hasler, Jan 02 2020

A228917 Number of undirected circular permutations i_0, i_1, ..., i_n of 0, 1, ..., n such that i_0+i_1, i_1+i_2, ...,i_{n-1}+i_n, i_n+i_0 are among those k with 6*k-1 and 6*k+1 twin primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 5, 2, 12, 39, 98, 526, 2117, 6663, 15043, 68403, 791581, 4826577, 19592777, 102551299, 739788968, 4449585790, 36547266589, 324446266072, 2743681178070
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 08 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This implies the twin prime conjecture, and it is similar to the prime circle problem mentioned in A051252.
For each n = 2,3,... construct an undirected simple graph T(n) with vertices 0,1,...,n which has an edge connecting two distinct vertices i and j if and only if 6*(i+j)-1 and 6*(i+j)+1 are twin primes. Then a(n) is just the number of Hamiltonian cycles contained in T(n). Thus a(n) > 0 if and only if T(n) is a Hamilton graph.
Zhi-Wei Sun also made the following similar conjectures for odd primes, Sophie Germain primes, cousin primes and sexy primes:
(1) For any integer n > 0, there is a permutation i_0, i_1, ..., i_n of 0, 1, ..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are integers of the form (p-1)/2, where p is an odd prime. Also, we may replace the above (p-1)/2 by (p+1)/4 or (p-1)/6; when n > 4 we may substitute (p-1)/4 for (p-1)/2.
(2) For any integer n > 2, there is a permutation i_0, i_1, ..., i_n of 0, 1,..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are integers of the form (p+1)/6, where p is a Sophie Germain prime.
(3) For any integer n > 3, there is a permutation i_0, i_1, ..., i_n of 0, 1,..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are among those integers k with 6*k+1 and 6*k+5 both prime.
(4) For any integer n > 4, there is a permutation i_0, i_1, ..., i_n of 0, 1,..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are among those integers k with 2*k-3 and 2*k+3 both prime.

Examples

			a(n) = 1 for n = 1,2,3 due to the permutation (0,...,n).
a(4) = 2 due to the permutations (0,1,4,3,2) and (0,2,1,4,3).
a(5) = 2 due to the permutations (0,1,4,3,2,5), (0,3,4,1,2,5).
a(6) = 2 due to the permutations
  (0,1,6,4,3,2,5) and (0,3,4,6,1,2,5).
a(7) = 5 due to the permutations
  (0,1,6,4,3,2,5,7), (0,1,6,4,3,7,5,2), (0,2,1,6,4,3,7,5),
  (0,3,4,6,1,2,5,7), (0,5,2,1,6,4,3,7).
a(8) = 2 due to the permutations
  (0,1,6,4,8,2,3,7,5) and (0,1,6,4,8,2,5,7,3).
a(9) = 12 due to the permutations
  (0,1,6,4,3,9,8,2,5,7), (0,1,6,4,8,9,3,2,5,7),
  (0,1,6,4,8,9,3,7,5,2), (0,2,1,6,4,8,9,3,7,5),
  (0,2,8,9,1,6,4,3,7,5), (0,3,4,6,1,9,8,2,5,7),
  (0,3,9,1,6,4,8,2,5,7), (0,3,9,8,4,6,1,2,5,7),
  (0,5,2,1,6,4,8,9,3,7), (0,5,2,8,4,6,1,9,3,7),
  (0,5,2,8,9,1,6,4,3,7), (0,5,7,3,9,1,6,4,8,2).
a(10) > 0 due to the permutation (0,5,2,3,9,1,6,4,8,10,7).
a(11) > 0 due to the permutation (0,10,8,9,3,7,11,6,4,1,2,5).
a(12) > 0 due to the permutation
        (0, 5, 2, 1, 6, 4, 3, 9, 8, 10, 7, 11, 12).
		

Crossrefs

Programs

  • Mathematica
    (* A program to compute required circular permutations for n = 7. To get "undirected" circular permutations, we should identify a circular permutation with the one of the opposite direction; for example, (0,7,5,2,3,4,6,1) is identical to (0,1,6,4,3,2,5,7) if we ignore direction. Thus a(7) is half of the number of circular permutations yielded by this program. *)
    tp[n_]:=tp[n]=PrimeQ[6n-1]&&PrimeQ[6n+1]
    V[i_]:=Part[Permutations[{1,2,3,4,5,6,7}],i]
    m=0
    Do[Do[If[tp[If[j==0,0,Part[V[i],j]]+If[j<7,Part[V[i],j+1],0]]==False,Goto[aa]],{j,0,7}];
    m=m+1;Print[m,":"," ",0," ",Part[V[i],1]," ",Part[V[i],2]," ",Part[V[i],3]," ",Part[V[i],4]," ",Part[V[i],5]," ",Part[V[i],6]," ",Part[V[i],7]];Label[aa];Continue,{i,1,7!}]

Extensions

a(10)-a(25) from Max Alekseyev, Sep 12 2013

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

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

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

Original entry on oeis.org

17, 23, 53, 73, 263, 613, 653, 1103, 1493, 1613, 1753, 1873, 2383, 2683, 3313, 3923, 4013, 5113, 5393, 5443, 5653, 6323, 6373, 9473, 11833, 12113, 12653, 13463, 14633, 14753, 15803, 15913, 17483, 18223, 19483, 20353, 21493, 23333, 24103
Offset: 1

Views

Author

Keywords

Comments

Is 17 the only term that is not equal to 3 mod 10? It is the only such term up to the one millionth prime. - Harvey P. Dale, Jan 25 2023

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p+6]&&PrimeQ[p+12]&&PrimeQ[p+18], AppendTo[lst, p+12]], {n, 8!}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)
    Select[Prime[Range[3000]],AllTrue[#+{-12,-6,6},PrimeQ]&] (* Harvey P. Dale, Jan 25 2023 *)

Formula

a(n) = A046122(n) + 6. - Amiram Eldar, Apr 22 2022

A088766 a(n) = (A087681(n)-1)/2.

Original entry on oeis.org

5, 6, 8, 11, 12, 17, 18, 23, 26, 32, 33, 36, 38, 47, 51, 53, 66, 71, 72, 78, 86, 92, 93, 102, 108, 116, 117, 122, 128, 131, 137, 138, 143, 171, 176, 186, 197, 201, 207, 212, 213, 218, 227, 236, 242, 246, 248, 257, 281, 296, 303, 306, 312, 318, 323, 326, 333, 366
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Comments

Numbers k such that 2*k + 1 - 6 and 2*k + 1 + 6 are sexy primes. [Jonathan Vos Post, Feb 14 2011]

Examples

			1002 is in the sequence because 2*1002 + 1 - 6 = 1999 is prime, and 2*1002 + 1 + 6 = 2011 is prime.
		

Crossrefs

Programs

  • Magma
    [n-1: n in [3..400] |IsPrime(2*n+5) and IsPrime(2*n-7)]; // Vincenzo Librandi, May 20 2017
  • Mathematica
    Select[Range[3, 1000], PrimeQ[2 # + 5] && PrimeQ[2 # - 7] &] - 1 (* Vincenzo Librandi, May 20 2017 *)

Formula

{k such that 2*k + 1 - 6 is in A023201} = {k such that 2*k + 1 + 6 is in A046117}.

A067831 Primes p such that sigma(p-6) < p.

Original entry on oeis.org

7, 11, 13, 17, 19, 23, 29, 37, 43, 47, 53, 59, 67, 73, 79, 89, 103, 107, 109, 113, 137, 157, 163, 173, 179, 197, 199, 229, 233, 239, 257, 263, 269, 277, 283, 313, 317, 337, 353, 359, 373, 379, 389, 439, 449, 463, 467, 509, 547, 563, 569, 577, 593, 599, 607
Offset: 1

Views

Author

Benoit Cloitre, Feb 08 2002

Keywords

Comments

Superset of A046117. - R. J. Mathar, Sep 30 2008

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[4,200]],DivisorSigma[1,#-6]<#&] (* Harvey P. Dale, Aug 10 2023 *)
  • PARI
    isok(p) = p > 6 && isprime(p) && sigma(p-6) < p; \\ Amiram Eldar, Apr 24 2025

A092216 Primes of the form p + 12 where p is a prime.

Original entry on oeis.org

17, 19, 23, 29, 31, 41, 43, 53, 59, 71, 73, 79, 83, 101, 109, 113, 139, 149, 151, 163, 179, 191, 193, 211, 223, 239, 241, 251, 263, 269, 281, 283, 293, 349, 359, 379, 401, 409, 421, 431, 433, 443, 461, 479, 491, 499, 503, 521, 569, 599, 613, 619, 631, 643, 653
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Apr 02 2004

Keywords

Crossrefs

Programs

Formula

a(n) = 12 + A046133(n). - R. J. Mathar, Jun 21 2010

A104227 Primes one less than the sum over a sexy prime pair.

Original entry on oeis.org

19, 31, 67, 79, 127, 139, 151, 199, 211, 307, 547, 619, 739, 751, 919, 1087, 1231, 1459, 1471, 1759, 1987, 2131, 2179, 2239, 2251, 2467, 2647, 2851, 2971, 3319, 3331, 3391, 3499, 3511, 3559, 3571, 3727, 3739, 4027, 4567, 4759, 5107, 5347, 5419, 5431, 6367, 6607, 6619, 7027, 7219, 7459
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 02 2005

Keywords

Comments

Primes of the form A023201(i)+A046117(i)-1 or of the form 2*A087695(j)-1.

Examples

			19=7+13-1 is a prime and one less than the sum 7+13 over the second sexy prime pair.
		

Crossrefs

Programs

  • Mathematica
    Select[2#+5&/@Select[Prime[Range[600]],PrimeQ[#+6]&],PrimeQ] (* Harvey P. Dale, Jan 04 2020 *)

Extensions

Corrected definition. Extended beyond a(7). - R. J. Mathar, Nov 26 2008
Previous Showing 11-20 of 66 results. Next