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

A007529 Prime triples: p; p+2 or p+4; p+6 all prime.

Original entry on oeis.org

5, 7, 11, 13, 17, 37, 41, 67, 97, 101, 103, 107, 191, 193, 223, 227, 277, 307, 311, 347, 457, 461, 613, 641, 821, 823, 853, 857, 877, 881, 1087, 1091, 1277, 1297, 1301, 1423, 1427, 1447, 1481, 1483, 1487, 1607, 1663, 1693, 1783, 1867, 1871, 1873, 1993, 1997
Offset: 1

Views

Author

Keywords

Comments

Or, prime(m) such that prime(m+2) = prime(m)+6. - Zak Seidov, May 07 2012

References

  • H. Riesel, "Prime numbers and computer methods for factorization", Progress in Mathematics, Vol. 57, Birkhauser, Boston, 1985, Chap. 4, see p. 65.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..310] | (NthPrime(n)+6) eq NthPrime(n+2)]; // Bruno Berselli, May 07 2012
    
  • Maple
    N:= 10000: # to get all terms <= N
    Primes:= select(isprime, [seq(2*i+1, i=1..floor((N+5)/2))]):locs:= select(t -> Primes[t+2]-Primes[t]=6, [$1..nops(Primes)-2]):
    Primes[locs]; # Robert Israel, Apr 30 2015
  • Mathematica
    ptrsQ[n_]:=PrimeQ[n+6]&&(PrimeQ[n+2]||PrimeQ[n+4])
    Select[Prime[Range[400]],ptrsQ]  (* Harvey P. Dale, Mar 08 2011 *)
  • PARI
    p=2;q=3;forprime(r=5,1e4,if(r-p==6,print1(p", "));p=q;q=r) \\ Charles R Greathouse IV, May 07 2012

Formula

a(n) = A098415(n) - 6. - Zak Seidov, Apr 30 2015

A098415 Greatest members r of prime triples (p,q,r) with p

Original entry on oeis.org

11, 13, 17, 19, 23, 43, 47, 73, 103, 107, 109, 113, 197, 199, 229, 233, 283, 313, 317, 353, 463, 467, 619, 647, 827, 829, 859, 863, 883, 887, 1093, 1097, 1283, 1303, 1307, 1429, 1433, 1453, 1487, 1489, 1493, 1613, 1669, 1699, 1789, 1873, 1877, 1879, 1999
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 07 2004

Keywords

Comments

Union of A098412 and A098413;
a(n)=A007529(n)+6; either a(n)=A098414(n)+2 or a(n)=A098414(n)+4.

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[350]],3,1],#[[3]]- #[[1]] == 6&]][[3]] (* Harvey P. Dale, Mar 17 2015 *)
  • PARI
    is(n)=isprime(n) && isprime(n-6) && (isprime(n-2) || isprime(n-4)) \\ Charles R Greathouse IV, Feb 23 2017

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
Showing 1-3 of 3 results.