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

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

A162336 Primes p of the form p = r+(r+1)/2 (where r is a prime number).

Original entry on oeis.org

5, 11, 17, 29, 47, 71, 89, 101, 107, 191, 197, 227, 251, 269, 317, 359, 461, 467, 521, 569, 647, 659, 701, 719, 821, 857, 881, 911, 929, 947, 971, 1091, 1109, 1181, 1217, 1259, 1289, 1361, 1367, 1451, 1487, 1559, 1637, 1847, 1889, 1979, 2099, 2141, 2207
Offset: 1

Views

Author

Keywords

Comments

Or primes of the form Sum_{x=1..n-th prime} (1-(-1)^x*x). - Juri-Stepan Gerasimov, Jul 14 2009
Primes p such that (2*p-1)/3 is prime. - J. M. Bergot, Aug 19 2020

Examples

			3+2=5, 7+4=11, 11+6=17, 19+10=29, 31+16=47, 47+24=71,.. r:3,7,11,19,31,47,59,67,71,127,131,151,167,179,211,239,307,311, ..A158709.
		

Crossrefs

Cf. A158709.

Programs

  • Maple
    filter:= p -> isprime(p) and isprime((2*p-1)/3):
    select(filter, [seq(i,i=5..10000,6)]); # Robert Israel, Aug 19 2020
  • Mathematica
    lst={};Do[r=Prime[n];p=r+(r+1)/2;If[PrimeQ[p],AppendTo[lst,p]],{n,6!}];lst
    Select[#+(#+1)/2&/@Prime[Range[300]],PrimeQ] (* Harvey P. Dale, Apr 30 2015 *)

Extensions

Edited by N. J. A. Sloane, Jul 18 2009

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

A158720 Primes p such that Floor[p/3]+p is prime.

Original entry on oeis.org

2, 13, 31, 67, 73, 103, 181, 193, 211, 307, 337, 433, 463, 571, 577, 607, 643, 661, 733, 757, 787, 823, 937, 967, 991, 1021, 1117, 1201, 1291, 1567, 1597, 1621, 1723, 1783, 1831, 1993, 2017, 2083, 2143, 2251, 2281, 2287, 2341, 2377, 2521, 2593, 2647, 2713
Offset: 1

Views

Author

Keywords

Comments

Floor[13/3]+13=17, ...

Crossrefs

Programs

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

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

Original entry on oeis.org

2, 5, 17, 23, 53, 59, 113, 149, 167, 179, 197, 233, 269, 347, 359, 449, 557, 563, 617, 647, 683, 743, 773, 797, 827, 863, 977, 1049, 1103, 1187, 1319, 1367, 1373, 1409, 1499, 1583, 1607, 1733, 1787, 1877, 1907, 1913, 1997, 2003, 2039, 2267, 2309, 2339
Offset: 1

Views

Author

Keywords

Comments

Original title was "Primes p such that Ceiling[p/3] + p is prime." If p = 1 mod 6, then p/3 falls between 2 and 3 mod 6, and the ceiling function bumps it up to 3 mod 6. Therefore ceiling(p/3) + p = 4 mod 6, which is an even number greater than 2 and therefore obviously composite.
Therefore the ceiling function is only necessary when the primality testing function requires an integer argument.
And so, aside from 2, all terms are congruent to 5 mod 6.
Set q = (p + 1)/3 + p, then (p + 1)/(q + 1) = 3/4. If this sequence is proven infinite, that would prove two specific cases of the Schinzel-SierpiƄski conjecture regarding rational numbers. - Alonso del Arte, Mar 12 2016

Examples

			2 is in the sequence because (2 + 1)/3 + 2 = 1 + 2 = 3, which is prime.
5 is in the sequence because (5 + 1)/3 + 5 = 2 + 5 = 7, which is prime.
11 is not in the sequence because (11 + 1)/3 + 11 = 15 = 3 * 5.
		

Crossrefs

Programs

Extensions

Title simplified by Alonso del Arte, Mar 12 2016
Showing 1-10 of 14 results. Next