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

A023186 Lonely (or isolated) primes: increasing distance to nearest prime.

Original entry on oeis.org

2, 5, 23, 53, 211, 1847, 2179, 3967, 16033, 24281, 38501, 58831, 203713, 206699, 413353, 1272749, 2198981, 5102953, 10938023, 12623189, 72546283, 142414669, 162821917, 163710121, 325737821, 1131241763, 1791752797, 3173306951, 4841337887, 6021542119, 6807940367, 7174208683, 8835528511, 11179888193, 15318488291, 26329105043, 31587561361, 45241670743
Offset: 1

Views

Author

Keywords

Comments

Erdős and Suranyi call these reclusive primes and prove that there are an infinite number of them. They define these primes to be between two primes. Hence their first term would be 3 instead of 2. Record values in A120937. - T. D. Noe, Jul 21 2006

Examples

			The nearest prime to 23 is 4 units away, larger than any previous prime, so 23 is in the sequence.
The prime a(4) = A120937(3) = 53 is at distance 2*3 = 6 from its neighbors {47, 59}. The prime a(5) = A120937(4) = A120937(5) = A120937(6) = 211 is at distance 2*6 = 12 from its neighbors {199, 223}. Sequence A120937 requires the terms to have 2 neighbors, therefore its first term is 3 and not 2. - _M. F. Hasler_, Dec 28 2015
		

References

  • Paul Erdős and Janos Suranyi, Topics in the theory of numbers, Springer, 2003.

Crossrefs

Programs

  • Mathematica
    p = 0; q = 2; i = 0; Do[r = NextPrime[q]; m = Min[r - q, q - p]; If[m > i, Print[q]; i = m]; p = q; q = r, {n, 1, 152382000}]
    Join[{2},DeleteDuplicates[{#[[2]],Min[Differences[#]]}&/@Partition[Prime[ Range[ 2,10^6]],3,1],GreaterEqual[ #1[[2]],#2[[2]]]&][[;;,1]]] (* The program generates the first 20 terms of the sequence. *) (* Harvey P. Dale, Aug 31 2023 *)

Extensions

More terms from Jud McCranie, Jun 16 2000
More terms from T. D. Noe, Jul 21 2006

A330428 Smallest prime p such that both nearest primes up and down are farther away than n*log(p).

Original entry on oeis.org

5, 211, 38501, 413353, 10938023, 142414669, 163710121, 8835528511, 31587561361, 343834606051, 1480975873513, 26923643849953
Offset: 1

Views

Author

Steven M. Altschuld, Dec 14 2019

Keywords

Comments

For these numbers, the name "Lowest Frogger Primes" LFP(n) is suggested because (frog) jumps with a length greater than n times the local average are required to bridge the gaps (logs).

Crossrefs

Cf. A288908 (with 1*log(P)), A330426 (with 2*log(P)), A330427 (with 3*log(P)).

Programs

  • PARI
    {my(npp=2,np=3,n=1);forprime(p=5,10^9,my(d=log(p)*n);if(np-npp>d&&p-np>d,print(np,", ");n++);npp=np;np=p)} \\ Hugo Pfoertner, Dec 14 2019

Extensions

a(5)-a(9) from Hugo Pfoertner, Dec 14 2019
a(10) from Hugo Pfoertner, Dec 16 2019
a(11)-a(12) from Giovanni Resta, Dec 19 2019

A289154 Smallest prime p > 2^n such that none of p -+ 2^0, p -+ 2^1, p -+ 2^2, ..., p -+ 2^n are prime.

Original entry on oeis.org

5, 23, 53, 211, 251, 787, 787, 1409, 1777, 1777, 1973, 3181, 4889, 8363, 19583, 34171, 66683, 131701, 263227, 527099, 1049011, 2098027, 4196407, 8389001, 16779001, 33555517, 67108913, 134219273, 268435537, 536871743, 1073743303, 2147485673, 4294968857
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jun 26 2017

Keywords

Examples

			a(0) = 5 because prime 5 > 2^0 = 1 and none of 5 - 2^0 = 4, 5 + 2^0 = 6 are prime,
a(1) = 23 because prime 23 > 2^1 = 2 and none of 23 - 2^2 = 22, 23 + 2^0 = 24, 23 - 2^1 = 21, 23 + 2^1 = 25 are prime,
a(2) = 53 because prime 53 > 2^2 = 4 and none of 53 - 2^0 = 52, 53 + 2^0 = 54, 53 - 2^1 = 51, 53 + 2^1 = 55, 53 - 2^2 = 49, 53 + 2^2 = 57 are prime.
		

Crossrefs

Cf. A120937.

Programs

  • Mathematica
    Table[p = NextPrime[2^n]; While[AnyTrue[p + Flatten@ Map[2^Range[0, n] # &, {-1, 1}], PrimeQ], p = NextPrime@ p]; p, {n, 0, 32}] (* Michael De Vlieger, Jun 27 2017 *)
  • PARI
    a(n)=if(n<1, return(5)); forprime(p=2^n+1,, for(k=1,n, if(isprime(p+2^k) || isprime(p-2^k), next(2))); return(p)) \\ Charles R Greathouse IV, Jul 07 2017

Extensions

More terms from Michael De Vlieger, Jun 27 2017
a(15) corrected by Charles R Greathouse IV, Jul 07 2017
Showing 1-3 of 3 results.