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.

A022004 Initial members of prime triples (p, p+2, p+6).

Original entry on oeis.org

5, 11, 17, 41, 101, 107, 191, 227, 311, 347, 461, 641, 821, 857, 881, 1091, 1277, 1301, 1427, 1481, 1487, 1607, 1871, 1997, 2081, 2237, 2267, 2657, 2687, 3251, 3461, 3527, 3671, 3917, 4001, 4127, 4517, 4637, 4787, 4931, 4967, 5231, 5477
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A001359. - R. J. Mathar, Feb 10 2013
All terms are congruent to 5 (mod 6). - Matt C. Anderson, May 22 2015
Intersection of A001359 and A023201. - Zak Seidov, Mar 12 2016

Crossrefs

Cf. A073648, A098412, A372247 (subsequence).
Subsequence of A007529.

Programs

  • Magma
    [ p: p in PrimesUpTo(10000) | IsPrime(p+2) and IsPrime(p+6) ] // Vincenzo Librandi, Nov 19 2010
    
  • Maple
    A022004 := proc(n)
        if n= 1 then
            5;
        else
            for a from procname(n-1)+2 by 2 do
                if isprime(a) and isprime(a+2) and isprime(a+6) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jul 11 2012
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[#+2] && PrimeQ[#+6]&] (* Vladimir Joseph Stephan Orlovsky, Mar 30 2011 *)
    Transpose[Select[Partition[Prime[Range[1000]],3,1],Differences[#]=={2,4}&]][[1]] (* Harvey P. Dale, Dec 24 2011 *)
  • PARI
    is(n)=isprime(n)&&isprime(n+2)&&isprime(n+6) \\ Charles R Greathouse IV, Jul 01 2013
    
  • Python
    from sympy import primerange
    def aupto(limit):
      p, q, alst = 2, 3, []
      for r in primerange(5, limit+7):
        if p+2 == q and p+6 == r: alst.append(p)
        p, q = q, r
      return alst
    print(aupto(5477)) # Michael S. Branicky, May 11 2021

A073648 Middle members of prime triples {p, p+2, p+6}.

Original entry on oeis.org

7, 13, 19, 43, 103, 109, 193, 229, 313, 349, 463, 643, 823, 859, 883, 1093, 1279, 1303, 1429, 1483, 1489, 1609, 1873, 1999, 2083, 2239, 2269, 2659, 2689, 3253, 3463, 3529, 3673, 3919, 4003, 4129, 4519, 4639, 4789, 4933, 4969, 5233, 5479, 5503, 5653, 6199
Offset: 1

Views

Author

Amarnath Murthy, Aug 09 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[850]],3,1],Differences[#]=={2,4}&]][[2]]  (* Harvey P. Dale, Feb 20 2011 *)

Formula

a(n) = A022004(n) + 2.

Extensions

More terms from Benoit Cloitre, Aug 13 2002

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

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 *)

A172454 Primes p such that (p, p+2, p+6, p+12) is a prime quadruple.

Original entry on oeis.org

5, 11, 17, 41, 101, 227, 347, 641, 1091, 1277, 1427, 1481, 1487, 1607, 2687, 3527, 3917, 4001, 4127, 4637, 4787, 4931, 8231, 9461, 10331, 11777, 12107, 13901, 14627, 16061, 19421, 20747, 21011, 21557, 22271, 23741, 25577, 26681, 26711, 27737
Offset: 1

Views

Author

Michel Lagneau, Feb 03 2010

Keywords

Comments

The four primes do not have to be consecutive. - Harvey P. Dale, Jul 23 2011

Examples

			The first two terms correspond to the quadruples (5,7,11,17) and (11,13,17,23).
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, E30.
  • P. A. MacMahon, The prime numbers of measurement on a scale, Proc. Camb. Phil. Soc. 21 (1923), 651-654; reprinted in Coll. Papers I, pp. 797-800.

Crossrefs

Programs

  • Maple
    for n from 1 by 2 to 110000 do; if isprime(n) and isprime(n+2) and isprime(n+6) and isprime(n+12) then print(n) else fi;od;
  • Mathematica
    Select[Prime[Range[3100]],And@@PrimeQ[{#+2,#+6,#+12}]&] (* Harvey P. Dale, Jul 23 2011 *)
  • PARI
    forprime(p=2,1e4,if(isprime(p+2)&&isprime(p+6)&&isprime(p+12), print1(p", "))) \\ Charles R Greathouse IV, Mar 04 2012

A172456 Primes p such that (p, p+2, p+6, p+12, p+14, p+20) is a prime sextuple.

Original entry on oeis.org

17, 1277, 1607, 3527, 4637, 71327, 97367, 113147, 191447, 290657, 312197, 416387, 418337, 421697, 450797, 566537, 795647, 886967, 922067, 1090877, 1179317, 1300127, 1464257, 1632467, 1749257, 1866857, 1901357, 2073347, 2322107
Offset: 1

Views

Author

Michel Lagneau, Feb 03 2010

Keywords

Comments

The last digit of each of these prime numbers is 7.
Subsequence of A078946.
The primes are always consecutive: The few ways of inserting other primes are: (p,p+2,p+4)... [impossible since one of these would be a multiple of 3]; (p,p+2,p+6),(p+8),(p+12),(p+14) [impossible since one of these would be a multiple of 5]; (p,p+2,p+6),(p+10) [impossible since one of these would be a multiple of 3]; (p,p+2,p+6),(p+12),(p+14),(p+16) [impossible since one of these would be a multiple of 3]; (p,p+2,p+6),(p+12),(p+14),(p+18) [impossible since one of these would be a multiple of 5]. - R. J. Mathar, Jun 15 2013

Examples

			The first two terms correspond to the sextuples (17,19,23,29,31,37) and (1277,1279,1283,1289,1291,1297).
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, E30.

Crossrefs

Initial members of prime quadruples (p, p+2, p+6, p+12): A172454.

Programs

  • Maple
    for n from 1 by 2 to 400000 do; if isprime(n) and isprime(n+2) and isprime(n+6) and isprime(n+12) and isprime(n + 14) and isprime(n+20) then print(n) else fi;od;
  • Mathematica
    Select[Prime[Range[171000]],And@@PrimeQ[{#+2,#+6,#+12,#+14,#+20}]&] (* Harvey P. Dale, Jul 23 2011 *)
    Select[Prime[Range[171000]],AllTrue[#+{2,6,12,14,20},PrimeQ]&] (* or *) Select[ Partition[Prime[Range[171000]],6,1],Differences[#]=={2,4,6,2,6}&][[All,1]] (* Harvey P. Dale, Sep 04 2022 *)

A163635 a(n) = 3*A022004(n) + 8.

Original entry on oeis.org

23, 41, 59, 131, 311, 329, 581, 689, 941, 1049, 1391, 1931, 2471, 2579, 2651, 3281, 3839, 3911, 4289, 4451, 4469, 4829, 5621, 5999, 6251, 6719, 6809, 7979, 8069, 9761, 10391, 10589, 11021, 11759, 12011, 12389, 13559, 13919, 14369, 14801
Offset: 1

Views

Author

Vincenzo Librandi, Aug 02 2009

Keywords

Comments

Sum of the members of the n-th prime triple (p, p+2, p+6).
All terms are congruent to 5 (mod 18). See A242215. - Robert Bilinski, Sep 24 2019

Examples

			23 is in the sequence because 23 = 5+7+11 = 3*5+8.
41 is in the sequence because 41 = 11+13+17 = 3*11+8.
		

Crossrefs

Programs

  • Magma
    [(3*p+8): p in PrimesUpTo(1000)| IsPrime(p+6) and IsPrime(p+2)]; // Vincenzo Librandi, Jan 06 2018
    
  • Mathematica
    8 + 3*Select[Prime[Range[1000]], PrimeQ[# + 2] && PrimeQ[# + 6] &] (* Vincenzo Librandi, Jan 04 2014 *)
  • PARI
    is(n)=n%18==5 && isprime(n\3-2) && isprime(n\3) && isprime(n\3+4) \\ Charles R Greathouse IV, Jan 06 2018

Formula

a(n) = A022004(n) + (A022004(n)+2) + (A022004(n)+6);
a(n) = A022004(n) + A073648(n) + A098412(n).

Extensions

Notation normalized by R. J. Mathar, Aug 07 2009

A214450 Smallest prime p such that n primes exist between the prime triple (p, p+2, p+6) and the next prime triple.

Original entry on oeis.org

5, 857, 311, 17, 31391, 3461, 1427, 12917, 1997, 4517, 41, 20747, 107, 1871, 1487, 4637, 2081, 347, 7877, 23057, 80777, 1091, 18041, 641, 461, 5231, 21017, 881, 4967, 45821, 1607, 15731, 165311, 17027, 35591, 26261, 11777, 8537, 64151, 101111, 82757, 23741
Offset: 0

Views

Author

Michel Lagneau, Jul 18 2012

Keywords

Examples

			a(3)= 17 because there exists 3 primes 29, 31 and 37 are between (17, 19,23) and (41,43,47).
		

Crossrefs

Programs

  • Maple
    A214450 := proc(n)
    local j, hi, lo ;
    if n = 0 then
    3;
    else
    for j from 1 do
    hi := numtheory[pi]( A022004 (j+1)) ;
    lo := numtheory[pi]( A098412 (j)) ;
    if hi-lo = n+1 then
    return A022004 (j);
    end if;
    end do:
    end if;
    end proc: # [Program from R. J. Mathar, adapted for this sequence (see A089637)].

A290706 Greatest of 4 consecutive primes with consecutive gaps 2, 4, 6.

Original entry on oeis.org

29, 53, 239, 359, 653, 1103, 1289, 1439, 1499, 1619, 2699, 3539, 3929, 4013, 4139, 4649, 4799, 4943, 8243, 9473, 10343, 11789, 12119, 13913, 14639, 20759, 21569, 23753, 25589, 26693, 26723, 27749, 27953, 28289, 29033, 31259
Offset: 1

Views

Author

Muniru A Asiru, Aug 09 2017

Keywords

Comments

All terms = {23, 29} mod 30.

Examples

			29 is a member of the sequence because 29 is the greatest of the 4 consecutive primes 17, 19, 23, 29 with consecutive gaps 2, 4, 6.
		

Crossrefs

Programs

  • GAP
    K:=3*10^7+1;; # to get all terms <= K.
    P:=Filtered([1,3..K],IsPrime);;    I:=[2,4,6];;
    P1:=List([1..Length(P)-1],i->P[i+1]-P[i]);;
    P2:=List([1..Length(P)-Length(I)],i->[P1[i],P1[i+1],P1[i+2]]);;
    P3:=List(Positions(P2,I),i->P[i+Length(I)]);
  • Maple
    for i from 1 to 10^5 do if ithprime(i+1)=ithprime(i)+2 and ithprime(i+2)=ithprime(i)+6 and ithprime(i+3)=ithprime(i)+12 then print(ithprime(i+3)); fi; od;
  • Mathematica
    Select[Prime@ Range@ 3500, NextPrime[#, {1, 2, 3}] == # + {2, 6, 12} &] + 12 (* Giovanni Resta, Aug 09 2017 *)

Formula

a(n) = A078847(n) + 12.
Showing 1-9 of 9 results.