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

A023202 Primes p such that p + 8 is also prime.

Original entry on oeis.org

3, 5, 11, 23, 29, 53, 59, 71, 89, 101, 131, 149, 173, 191, 233, 263, 269, 359, 389, 401, 431, 449, 479, 491, 563, 569, 593, 599, 653, 683, 701, 719, 743, 761, 821, 911, 929, 983, 1013, 1031, 1061, 1109, 1163, 1193, 1223, 1229, 1283, 1289, 1319, 1373, 1439
Offset: 1

Views

Author

Keywords

Comments

All terms > 3 are congruent to 5 mod 6 (observation by Zak Seidov in SeqFan). Thus each corresponding p + 8 is congruent to 1 mod 6. - Rick L. Shepherd, Mar 25 2023

Crossrefs

Programs

A049437 Primes p such that p+2 and p+8 are also primes but p+6 is not.

Original entry on oeis.org

3, 29, 59, 71, 149, 269, 431, 569, 599, 1031, 1061, 1229, 1289, 1319, 1451, 1619, 2129, 2339, 2381, 2549, 2711, 2789, 3299, 3539, 4019, 4049, 4091, 4649, 4721, 5099, 5441, 5519, 5639, 5741, 5849, 6269, 6359, 6569, 6701, 6959, 7211
Offset: 1

Views

Author

Keywords

Comments

p+4 is not prime here except for p=3.

Examples

			p=29 is the smallest prime so that p, p+2 and p+8 are consecutive primes.
		

Crossrefs

Subsequence of A001359. - R. J. Mathar, Feb 10 2013

Programs

  • Magma
    [p: p in PrimesUpTo(8000)| IsPrime(p+2) and IsPrime(p+8) and not IsPrime(p+6) ] // Vincenzo Librandi, Jan 28 2011
    
  • Maple
    select(p -> isprime(p) and isprime(p+2) and isprime(p+8) and not isprime(p+6), [3, seq(i,i=5..10000, 6)]); # Robert Israel, Nov 20 2017
  • Mathematica
    {3}~Join~Select[Partition[Prime@ Range[10^3], 3, 1], Differences@ # == {2, 6} &][[All, 1]] (* Michael De Vlieger, Nov 20 2017 *)
  • PARI
    lista(nn) = forprime(p=3, nn, if(isprime(p+2) && isprime(p+8) && !isprime(p+6), print1(p, ", "))) \\ Iain Fox, Nov 20 2017

A049438 p, p+6 and p+8 are all primes (A046138) but p+2 is not.

Original entry on oeis.org

23, 53, 131, 173, 233, 263, 563, 593, 653, 1013, 1223, 1283, 1601, 1613, 2333, 2543, 2963, 3323, 3533, 3761, 3911, 3923, 4013, 4211, 4253, 4643, 4793, 5003, 5273, 5471, 5843, 5861, 6263, 6353, 6563, 6653, 6863, 7121, 7451, 7481, 7541, 7583
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A031924. - R. J. Mathar, Jun 15 2013

Programs

  • Mathematica
    Select[Prime@ Range[10^3], MatchQ[Boole@ PrimeQ@ {# + 2, # + 6, # + 8}, {0, 1, 1}] &] (* Michael De Vlieger, Feb 05 2017 *)
  • PARI
    isok(p) = isprime(p) && !isprime(p+2) && isprime(p+6) && isprime(p+8); \\ Michel Marcus, Dec 13 2013

A049436 p, p+8 and either p+2 or p+6 or both are all primes.

Original entry on oeis.org

3, 5, 11, 23, 29, 53, 59, 71, 101, 131, 149, 173, 191, 233, 263, 269, 431, 563, 569, 593, 599, 653, 821, 1013, 1031, 1061, 1223, 1229, 1283, 1289, 1319, 1451, 1481, 1601, 1613, 1619, 1871, 2081, 2129, 2333, 2339, 2381, 2543, 2549, 2711, 2789, 2963, 3251
Offset: 1

Views

Author

Keywords

Examples

			3 is here because 5, 7 and 11 are primes; 5 is here because 7, 11 and 13 are primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[#+8]&&AnyTrue[#+{2,6},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 04 2017 *)

A233540 Primes p such that p+2, p+8, and p+12 are all prime.

Original entry on oeis.org

5, 11, 29, 59, 71, 101, 269, 431, 1289, 1481, 2129, 2339, 2381, 2789, 4721, 5519, 5639, 5849, 6569, 6959, 8999, 10091, 13679, 14549, 16061, 16649, 16691, 18119, 19379, 19421, 19751, 21011, 21491, 22271, 25931, 27689, 27791, 28619, 31181, 32369, 32561, 32831
Offset: 1

Views

Author

K. D. Bajpai, Dec 12 2013

Keywords

Comments

The primes produced (p, p+2, p+8, p+12) are not always consecutive primes.

Examples

			29 is in the sequence because 29, 29 + 2 = 31, 29 + 8 = 37, and 29 + 12 = 41 are all prime.
		

Crossrefs

Cf. A007530 (prime quadruples).
Cf. A078848 (same prime differences, but with consecutive primes).

Programs

  • Maple
    KD := proc() local a,b,c,p; p:=ithprime(n);a:=p+2;b:=p+8;c:=p+12;if isprime(a)and isprime(b) and isprime(c) then RETURN (p); fi; end: seq(KD(), n=1..10000);
    # K. D. Bajpai, Dec 27 2013
  • Mathematica
    Select[Prime[Range[4000]],AllTrue[#+{2,8,12},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 04 2016 *)
  • PARI
    is_a233540(p) = isprime(p) && isprime(p+2) && isprime(p+8) && isprime(p+12) \\ Michael B. Porter, Dec 27 2013

Formula

A046141 INTERSECT A046134. - R. J. Mathar, Aug 20 2019

A342966 Number of permutations tau of {1,...,n} with tau(n) = n such that p = tau(1)^(tau(2)-1) + ... + tau(n-1)^(tau(n)-1) + tau(n)^(tau(1)-1), and p - 2 and p + 6 are all prime.

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 10, 55, 199, 1915, 13679, 86296
Offset: 2

Views

Author

Zhi-Wei Sun, Apr 01 2021

Keywords

Comments

a(n) > 0 for all n > 2.

Examples

			a(3) = 1 with p = 2^(1-1) + 1^(3-1) + 3^(2-1) = 5, p - 2 = 3 and p + 6 = 11 all prime.
a(4) = 1 with p = 1^(3-1) + 3^(2-1) + 2^(4-1) + 4^(1-1) = 13, p - 2 = 11 and p + 6 = 19 all prime.
a(5) = 1 with p = 2^(4-1) + 4^(3-1) + 3^(1-1) + 1^(5-1) + 5^(2-1) = 31, p - 2 = 29 and p + 6 = 37 all prime.
a(6) = 1 with p = 4^(3-1) + 3^(1-1) + 1^(5-1) + 5^(2-1) + 2^(6-1) + 6^(4-1) = 271, p - 2 = 269 and p + 6 = 277 all prime.
a(10) > 0 since p = 4^(8-1) + 8^(5-1) + 5^(6-1) + 6^(3-1) + 3^(9-1) + 9^(1-1) + 1^(7-1) + 7^(2-1) + 2^(10-1) + 10^(4-1) = 31723, p - 2 = 31721 and p + 6 = 31729 are all prime.
		

Crossrefs

Programs

  • Mathematica
    (* A program to compute a(7): *)
    PQ[n_]:=PQ[n]=PrimeQ[n]&&PrimeQ[n-2]&&PrimeQ[n+6];
    V[i_]:=V[i]=Part[Permutations[{1,2,3,4,5,6}],i];
    S[i_]:=S[i]=Sum[V[i][[j]]^(V[i][[j+1]]-1), {j,1,5}]+V[i][[6]]^6+7^(V[i][[1]]-1);
    n=0;Do[If[PQ[S[i]],n=n+1],{i,1,6!}];Print[7," ",n]

Extensions

a(11)-a(13) from Jinyuan Wang, Apr 02 2021

A350856 Initial members of prime triples (p, p+2, p+14).

Original entry on oeis.org

3, 5, 17, 29, 59, 137, 149, 179, 197, 227, 269, 419, 599, 617, 659, 809, 1019, 1049, 1277, 1289, 1607, 1787, 1997, 2129, 2237, 2267, 2657, 2789, 3167, 3257, 3299, 3329, 3359, 3527, 3557, 3917, 3929, 4217, 4229, 4259, 4547, 4637, 4649, 4787, 4799, 5009, 5099
Offset: 1

Views

Author

Matt C. Anderson, Jan 19 2022

Keywords

Comments

According to the k-tuple conjecture this sequence is theoretically infinite.

Crossrefs

Cf. A022004 (p,p+2,p+6), A046134 (p,p+2,p+8), A046135 (p,p+2,p+12).

Programs

  • Maple
    for a from 3 to 1000 by 2 do
    if isprime(a) and isprime(a+2) and isprime(a+14) then
    print(a);
    end if
    end do
    # second Maple program:
    q:= p-> andmap(isprime, [p, p+2, p+14]):
    select(q, [$1..10000])[];  # Alois P. Heinz, Jan 28 2022
  • Mathematica
    Select[Range[7000], And @@ PrimeQ[# + {0, 2, 14}] &] (* Amiram Eldar, Jan 20 2022 *)
Showing 1-7 of 7 results.