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

A137873 Prime numbers, isolated from neighboring primes by more than 12.

Original entry on oeis.org

1847, 2179, 2503, 2819, 3137, 3433, 3967, 4177, 4621, 4831, 5623, 5953, 6637, 7283, 7369, 7393, 7433, 7621, 7993, 8039, 8147, 9257, 9587, 10753, 11027, 11197, 11213, 11369, 11657, 13063, 13367, 13381, 13537, 13553, 13649, 13859, 14107, 14221
Offset: 1

Views

Author

Keywords

Comments

The definition means that p+-2, p+-4, p+-6, p+-8, p+-10 and p+-12 are all composite. - N. J. A. Sloane, Jun 04 2008

Crossrefs

Note that this is different from A137796.

Programs

  • Mathematica
    q=12;s="";For[i=1,i<12^2,p=Prime[i];a=0;For[j=2,j<=q,If[PrimeQ[p-j]||PrimeQ[p+j], a=1;Break[]];j=j+2];If[a==0,s=s<>ToString[p]<>","];i++ ];Print[s]
    Prime[Select[Range[2,2000],Prime[ #-1]+12Ray Chandler, May 02 2009 *)
    Select[Partition[Prime[Range[2000]],3,1],Min[Differences[#]]>12&][[All,2]] (* Harvey P. Dale, Apr 09 2022 *)

Extensions

Extended by Ray Chandler, May 02 2009

A161723 Middle members p of prime triples (p-18,p,p+18).

Original entry on oeis.org

23, 29, 41, 61, 71, 79, 89, 131, 149, 181, 211, 251, 331, 349, 401, 439, 449, 461, 659, 691, 701, 709, 751, 769, 839, 929, 1031, 1051, 1069, 1231, 1301, 1471, 1549, 1601, 1619, 1741, 1759, 1889, 1931, 2011, 2081, 2161, 2221, 2269, 2399, 2441, 2459, 2521
Offset: 1

Views

Author

Keywords

Comments

The three primes p-18, p and p+18 are not necessarily consecutive.

Examples

			23 is the middle in the triple of three primes (23-18=5, 23, 23+18=41) with arithmetic progression 18.
		

Crossrefs

Programs

  • Mathematica
    q=6*3; lst={}; Do[p=Prime[n]; If[PrimeQ[p-q] && PrimeQ[p+q], AppendTo[lst,p]], {n, 5000}]; lst
    Select[Prime[Range[7,400]],AllTrue[#+{18,-18},PrimeQ]&] (* Harvey P. Dale, Apr 21 2024 *)

Formula

{p: p in A153418 and p-18 in A153418} - R. J. Mathar, Sep 22 2009

Extensions

Rephrased the definition - R. J. Mathar, Sep 22 2009

A161724 Primes p such that also p-24 and p+24 are primes.

Original entry on oeis.org

29, 37, 43, 47, 83, 103, 107, 113, 127, 173, 257, 293, 307, 373, 397, 433, 443, 463, 467, 523, 547, 593, 617, 677, 733, 797, 853, 863, 883, 887, 953, 1063, 1093, 1283, 1303, 1423, 1447, 1583, 1723, 1777, 1847, 1973, 2003, 2063, 2087, 2113, 2137, 2333, 2357
Offset: 1

Views

Author

Keywords

Comments

Apart from the first term, values are 3 or 7 mod 10. - Charles R Greathouse IV, Oct 12 2009

Examples

			29-24=5,29+24=53; ...
		

Crossrefs

Programs

  • Mathematica
    q=6*4; lst={}; Do[p=Prime[n]; If[PrimeQ[p-q] && PrimeQ[p+q], AppendTo[lst,p]], {n, 5000}]; lst

Extensions

Definition edited by Emeric Deutsch, Jun 28 2009

A161725 Primes p such that also p+30 and p-30 are primes.

Original entry on oeis.org

37, 41, 43, 53, 59, 67, 71, 73, 83, 97, 101, 109, 127, 137, 167, 181, 193, 197, 211, 227, 241, 263, 281, 307, 337, 367, 379, 389, 409, 419, 431, 449, 461, 479, 491, 571, 577, 587, 601, 617, 631, 643, 647, 661, 739, 757, 827, 853, 857, 907, 911, 937, 941, 967
Offset: 1

Views

Author

Keywords

Examples

			The prime p=37 is in the sequence because 37-30=7 and 37+30=67 are also primes.
		

Crossrefs

Programs

  • Mathematica
    q=6*5; lst={}; Do[p=Prime[n]; If[PrimeQ[p-q] && PrimeQ[p+q], AppendTo[lst,p]], {n, 5000}]; lst

Extensions

Definition edited by Emeric Deutsch, Jun 28 2009

A268914 Minimum difference between two distinct primes whose sum is 2*prime(n), n>4.

Original entry on oeis.org

12, 12, 12, 24, 12, 24, 24, 12, 24, 48, 12, 12, 24, 36, 12, 24, 12, 36, 48, 36, 60, 24, 12, 12, 60, 48, 48, 36, 60, 24, 36, 24, 12, 72, 60, 12, 24, 36, 84, 60, 60, 84, 24, 120, 60, 96, 12, 24, 60, 24, 12, 12, 24, 84, 12, 24, 108, 48, 48, 84, 72, 72, 36, 60, 72, 36, 12, 84, 60, 12, 60, 72, 60, 48, 36, 24, 60, 24, 24, 48, 36, 48, 36, 168, 36, 48
Offset: 5

Views

Author

Barry Cherkas, Feb 15 2016

Keywords

Comments

If p>4 is prime, any two primes that add to 2p must be equidistant from p. If p is congruent to 1 Mod 3, then p+2 and p-4 are divisible by 3. Alternatively, if p is congruent to 2 Mod 3, the p-2 and p+4 are divisible by 3. Thus, the equidistant pairs (p-2,p+2) and (p-4,p+4) cannot be primes that add to 2p. On the other hand, adding or subtracting any multiple of 6 will be congruent to the same congruence class as p and may be prime. Thus, the minimal difference between distinct primes that add to p must be a multiple of 12.
Extrapolating from computational evidence for all primes up to 10^9, we conjecture: For each multiple of 12 there are infinitely many primes p such that p-6k and p+6k are prime and 12k is the minimal difference for two distinct primes whose sum is 2p.

Examples

			For n=5, 2*prime(5)=2*11=5+17 and 17-5=12.
For n=6, 2*prime(6)=2*13=7+19 and 19-7=12.
...
For n=8, 2*prime(8)=2*19=7+31 and 31-7=24.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get a(5) .. a(N)
    p:= 7:
    for n from 5 to N do
      p:= nextprime(p);
      for k from 6 by 6 while not isprime(p+k) or not isprime(p-k) do od:
      A[n]:= 2*k
    od:
    seq(A[n],n=5..N); # Robert Israel, Mar 09 2016
  • Mathematica
    f[n_]:=Block[{p=Prime[n],k},k=p+6;
    While[!PrimeQ[k]||!PrimeQ[2p-k],k=k+6];2(k-p)];
    seq=Reap[Do[Sow[f[n]],{n,5,200}]][[2]][[1]];
    seq
    (*For large data sets (say, N>5000), replace 200 with N and the above algorithm is comparatively efficient.*)
    Table[2 SelectFirst[Range[#/2], Function[k, AllTrue[{#/2 + k, #/2 - k}, PrimeQ]]] &[2 Prime@ n], {n, 5, 120}] (* Michael De Vlieger, Mar 09 2016, Version 10 *)
  • PARI
    a(n) = {p = prime(n); d = 2; while (! (isprime(p-d) && isprime(p+d)),  d+=2); 2*d;} \\ Michel Marcus, Mar 17 2016

Formula

a(n) = 2*A078611(n+2).
Showing 1-5 of 5 results.