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-10 of 18 results. Next

A158710 Primes p which are not in A158708 and A158709.

Original entry on oeis.org

17, 23, 37, 43, 61, 79, 83, 89, 97, 103, 107, 113, 137, 139, 157, 163, 173, 191, 193, 197, 199, 223, 227, 229, 241, 251, 257, 263, 269, 271, 277, 283, 313, 317, 331, 337, 353, 359, 367, 373, 383, 389, 397, 419, 433, 443, 457, 463, 487, 491, 499, 503, 509, 521
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[ !PrimeQ[Floor[p/2]+p]&&!PrimeQ[Ceiling[p/2]+p],AppendTo[lst,p]],{n,6!}];lst

A265759 Numerators of primes-only best approximates (POBAs) to 1; see Comments.

Original entry on oeis.org

3, 2, 5, 13, 11, 19, 17, 31, 29, 43, 41, 61, 59, 73, 71, 103, 101, 109, 107, 139, 137, 151, 149, 181, 179, 193, 191, 199, 197, 229, 227, 241, 239, 271, 269, 283, 281, 313, 311, 349, 347, 421, 419, 433, 431, 463, 461, 523, 521, 571, 569, 601, 599, 619, 617
Offset: 1

Views

Author

Clark Kimberling, Dec 15 2015

Keywords

Comments

Suppose that x > 0. A fraction p/q of primes is a primes-only best approximate (POBA), and we write "p/q in B(x)", if 0 < |x - p/q| < |x - u/v| for all primes u and v such that v < q. Note that for some choices of x, there are values of q for which there are two POBAs. In these cases, the greater is placed first; e.g., B(3) = (7/2, 5/2, 17/5, 13/5, 23/7, 19/7, ...).
See A265772 and A265774 for definitions of lower POBA and upper POBA. In the following guide, for example, A001359/A006512 represents (conjecturally in some cases) the Lower POBAs p(n)/q(n) to 1, where p = A001359 and q = A006512 except for first terms in some cases. Every POBA is either a lower POBA or an upper POBA.
x Lower POBA Upper POBA POBA

Examples

			The POBAs for 1 start with 3/2, 2/3, 5/7, 13/11, 11/13, 19/17, 17/19, 31/29, 29/31, 43/41, 41/43, 61/59, 59/61. For example, if p and q are primes and q > 13, then 11/13 is closer to 1 than p/q is.
		

Crossrefs

Programs

  • Mathematica
    x = 1; z = 200; p[k_] := p[k] = Prime[k];
    t = Table[Max[Table[NextPrime[x*p[k], -1]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tL = Select[d, # > 0 &] (* lower POBA *)
    t = Table[Min[Table[NextPrime[x*p[k]]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tU = Select[d, # > 0 &] (* upper POBA *)
    v = Sort[Union[tL, tU], Abs[#1 - x] > Abs[#2 - x] &];
    b = Denominator[v]; s = Select[Range[Length[b]], b[[#]] == Min[Drop[b, # - 1]] &];
    y = Table[v[[s[[n]]]], {n, 1, Length[s]}] (* POBA, A265759/A265760 *)
    Numerator[tL]   (* A001359 *)
    Denominator[tL] (* A006512 *)
    Numerator[tU]   (* A006512 *)
    Denominator[tU] (* A001359 *)
    Numerator[y]    (* A265759 *)
    Denominator[y]  (* A265760 *)

A158709 Primes p such that p + ceiling(p/2) is prime.

Original entry on oeis.org

2, 3, 7, 11, 19, 31, 47, 59, 67, 71, 127, 131, 151, 167, 179, 211, 239, 307, 311, 347, 379, 431, 439, 467, 479, 547, 571, 587, 607, 619, 631, 647, 727, 739, 787, 811, 839, 859, 907, 911, 967, 991, 1039, 1091, 1231, 1259, 1319, 1399, 1427, 1471, 1511, 1531, 1559
Offset: 1

Views

Author

Keywords

Comments

Or, 2 along with primes p such that Sum_{x=1..p} (1 - (-1)^x*x) is prime. - Juri-Stepan Gerasimov, Jul 14 2009
Apart from the first term, primes of the form 4*k-1 such that 6*k-1 is also prime. - Charles R Greathouse IV, Nov 09 2011
If both p and q are in A158709 and p + q == 2 (mod 4), then A006370(A006370(p + q)) = A006370((p + q)/2) = 3*(p + q)/2 + 1 is the sum of the two primes p+ceiling(p/2) and q+ceiling(q/2). - Roderick MacPhee, Feb 23 2018

Crossrefs

Cf. A158708.

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[Ceiling[p/2]+p],AppendTo[lst,p]],{n,6!}];lst
    Select[Prime@ Range@ 250, PrimeQ@ Ceiling[3#/2] &] (* Vincenzo Librandi, Apr 15 2013 and slightly modified by Robert G. Wilson v, Feb 26 2018 *)
  • PARI
    forprime(p=2,1e4,if(isprime(p+ceil(p/2)),print1(p", "))) \\ Charles R Greathouse IV, Nov 09 2011
    
  • PARI
    print1(2);forprime(p=3,1e4,if(p%4==3&&isprime(p\4*6+5),print1(", "p))) \\ Charles R Greathouse IV, Nov 09 2011

Extensions

Corrected by Charles R Greathouse IV, Mar 18 2010

A158711 Primes p such that p1=Floor[p/2]+p is prime and p2=Floor[p1/2]+p1 is prime.

Original entry on oeis.org

73, 233, 281, 409, 449, 569, 953, 1129, 1193, 1409, 1481, 2473, 2801, 3041, 3209, 3329, 3761, 3833, 3881, 4049, 4153, 5113, 5441, 6673, 7193, 9601, 9689, 10433, 10889, 11161, 11321, 11369, 11593, 11953, 12041, 12113, 12329, 12713, 12721
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p=Floor[p/2]+p],If[PrimeQ[p=Floor[p/2]+p],AppendTo[lst,Prime[n]]]],{n,7!}];lst
    prQ[n_]:=Module[{p1=Floor[n/2]+n},AllTrue[{p1,Floor[p1/2]+p1},PrimeQ]]; Select[Prime[Range[1600]],prQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 21 2016 *)

Extensions

Definition corrected by Harvey P. Dale, Apr 21 2016

A158712 Primes p such that p1=Floor[p/2]+p is prime and p2=Ceiling[p1/2]+p1 is prime.

Original entry on oeis.org

2, 5, 13, 101, 293, 421, 541, 661, 821, 1021, 1301, 1493, 2621, 3221, 3373, 3853, 5693, 5981, 6133, 6421, 6733, 7853, 8861, 8941, 9173, 9221, 9341, 9901, 10061, 10093, 10181, 10613, 15373, 16061, 16333, 16381, 16421, 17093, 18061, 18493, 19141
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p=Floor[p/2]+p],If[PrimeQ[p=Ceiling[p/2]+p],AppendTo[lst,Prime[n]]]],{n,7!}];lst
    pQ[n_]:=Module[{p1=Floor[n/2]+n},AllTrue[{p1,Ceiling[p1/2]+p1},PrimeQ]]; Select[Prime[Range[2500]],pQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 07 2019 *)

Extensions

Definition corrected by Harvey P. Dale, Feb 07 2019

A158714 Primes p such that p1 = ceiling(p/2) + p is prime and p2 = floor(p1/2) + p1 is prime.

Original entry on oeis.org

3, 19, 67, 307, 379, 467, 547, 587, 739, 859, 1259, 1699, 1747, 1867, 2027, 2699, 2819, 3259, 3539, 4019, 4507, 5059, 5779, 7547, 8219, 8539, 8747, 8819, 9547, 10067, 10499, 10667, 11939, 13259, 13627, 13859, 14939, 17659, 17707, 17987, 18859
Offset: 1

Views

Author

Keywords

Comments

All a(n) == 3 (mod 8), as this is necessary for p, p1 and p2 to be odd. - Robert Israel, May 11 2014

Examples

			67 is in the sequence because 67, ceiling(67/2) + 67 = 101 and floor(101/2) + 101 = 151 are all primes.
		

Crossrefs

Programs

  • Maple
    N:= 10^5; # to get all entries <= N
    filter:= proc(p)
         local p1,p2;
         if not isprime(p) then return false fi;
         p1:= ceil(p/2)+p;
         if not isprime(p1) then return false fi;
         p2:= floor(p1/2)+p1;
         isprime(p2);
    end proc;
    select(filter,[seq(2*i+1,i=1..floor((N-1)/2)]; # Robert Israel, May 09 2014
  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p=Ceiling[p/2]+p],If[PrimeQ[p=Floor[p/2]+p],AppendTo[lst,Prime[n]]]],{n,7!}];lst

Extensions

Definition corrected by Robert Israel, May 09 2014

A158713 Primes p such that p1=Ceiling[p/2]+p is prime and p2=Ceiling[p1/2]+p is prime.

Original entry on oeis.org

7, 47, 127, 167, 239, 439, 479, 607, 967, 1319, 1559, 1999, 2239, 2447, 2719, 3359, 4007, 4327, 4967, 5039, 5279, 5407, 5879, 6007, 6287, 7127, 7607, 8167, 8447, 8527, 8999, 9127, 9439, 9967, 10487, 11087, 11287, 11399, 11527, 11719, 11927, 11959, 12479
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    cpQ[n_]:=Module[{p1=Ceiling[n/2]+n},AllTrue[{p1,Ceiling[p1/2]+n}, PrimeQ]]; Select[Prime[Range[2000]],cpQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 29 2017 *)

Extensions

Corrected and incorrect Mathematica program deleted by Harvey P. Dale, May 29 2017

A104163 Primes p such that (2p+1)/3 is prime.

Original entry on oeis.org

7, 19, 43, 61, 79, 109, 151, 163, 223, 271, 349, 421, 439, 523, 601, 613, 631, 673, 691, 811, 853, 919, 991, 1009, 1051, 1063, 1153, 1213, 1231, 1279, 1321, 1429, 1531, 1549, 1663, 1693, 1789, 1801, 1873, 1933, 1951, 2113, 2143, 2179, 2221, 2239, 2503, 2539
Offset: 1

Views

Author

Roger L. Bagula, Mar 10 2005

Keywords

Comments

Dickson's conjecture implies that this sequence is infinite. - Charles R Greathouse IV, Jul 31 2012

Examples

			7 is in the sequence because (2 * 7 + 1)/3 = 5, which is also prime.
19 is in the sequence because (2 * 19 + 1)/3 = 13, which is also prime.
		

Crossrefs

Cf. A005384.

Programs

  • Mathematica
    Select[Range[7, 2539, 2], PrimeQ[#] && PrimeQ[(2# + 1)/3]&] (* Zak Seidov, Jul 31 2012 *)
    Select[Prime[Range[400]], PrimeQ[(2 # + 1) / 3]&] (* Vincenzo Librandi, Apr 14 2013 *)
  • PARI
    is(n)=n%3==1 && isprime((2*n+1)/3) && isprime(n) \\ Charles R Greathouse IV, Jul 31 2012

Formula

a(n)=(3*A158708(n+1)-1)/2 Zak Seidov, Jul 31 2012

Extensions

New name from Charles R Greathouse IV, Jul 31 2012

A158719 Primes p such that p1 = floor(p/2)+p is not prime and p2 = ceiling(p/2)+p is not prime, p3 = floor(p1/2)+p1 is not prime and p5 = ceiling(p1/2)+p1 is not prime, p4 = floor(p2/2)+p2 is not prime and p6 = ceiling(p2/2)+p2 is not prime.

Original entry on oeis.org

83, 97, 113, 227, 229, 251, 269, 271, 277, 283, 313, 317, 331, 353, 389, 397, 419, 433, 457, 463, 491, 503, 509, 523, 557, 563, 593, 599, 601, 617, 641, 653, 683, 691, 733, 743, 751, 757, 761, 773, 797, 823, 829, 857, 863, 937, 941, 971, 977, 1013, 1031, 1049
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[ !PrimeQ[p1=Floor[p/2]+p]&&!PrimeQ[p2=Ceiling[p/2]+p],If[ !PrimeQ[p3=Floor[p1/2]+p1]&&!PrimeQ[p5=Ceiling[p1/2]+p1],If[ !PrimeQ[p4=Floor[p2/2]+p2]&&!PrimeQ[p6=Ceiling[p2/2]+p2],AppendTo[lst,Prime[n]]]]],{n,6!}];lst
    nonpQ[p_]:=Module[{p1=Floor[p/2]+p,p2=Ceiling[p/2]+p},NoneTrue[ {p1,p2,Floor[ p1/2]+p1,Ceiling[p1/2]+p1,Floor[p2/2]+p2,Ceiling[p2/2]+ p2},PrimeQ]]; Select[Prime[Range[200]],nonpQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 21 2019 *)

A164620 Primes p such that 1 +p*floor(p/2) is also prime.

Original entry on oeis.org

2, 5, 13, 17, 41, 61, 89, 97, 101, 113, 149, 173, 229, 241, 281, 317, 349, 353, 373, 397, 409, 421, 433, 461, 509, 521, 661, 673, 761, 853, 881, 937, 941, 1013, 1093, 1109, 1249, 1289, 1297, 1373, 1433, 1549, 1741, 1753, 1913, 2113, 2213, 2269, 2281, 2297
Offset: 1

Views

Author

Keywords

Examples

			p=2 qualifies since 2*1+1=3 is prime. p=5 qualifies since 5*2+1=11 is prime.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p*Floor[p/2]+1],AppendTo[lst,p]],{n,3*6!}]; lst
    Select[Prime[Range[350]],PrimeQ[1+#*Floor[#/2]]&] (* Harvey P. Dale, Apr 07 2015 *)

Extensions

Comments turned into examples by R. J. Mathar, Sep 17 2009
Showing 1-10 of 18 results. Next