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 19 results. Next

A182426 Lengths of runs of consecutive isolated primes beginning with A166251(n).

Original entry on oeis.org

2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 3, 2, 1, 2, 1, 2, 1, 4, 3, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 3, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 3, 2, 1, 2, 1, 1, 2, 1, 2, 1, 3, 2, 1
Offset: 1

Views

Author

Vladimir Shevelev, Apr 28 2012

Keywords

Comments

Theorem. If the sequence is unbounded, then there exist arbitrarily long sequences of consecutive primes p_k, p_(k+1),...,p_m such that every interval (p_i/2, p_(i+1)/2), i=k,k+1,...,m-1, contains a prime.

Crossrefs

Programs

  • Haskell
    import Data.List (group)
    a182426 n = a182426_list !! (n-1)
    a182426_list = concatMap f $ group $ zipWith (-) (tail ips) ips where
       f xs | head xs == 1 = reverse $ enumFromTo 2 $ length xs + 1
            | otherwise    = take (length xs) $ repeat 1
       ips = map a049084 a166251_list
    -- Reinhard Zumkeller, May 18 2012

Extensions

Data corrected: a(49)=2.

A164333 Primes prime(k) such that all integers in the interval [(prime(k-1)+1)/2, (prime(k)-1)/2] are composite numbers.

Original entry on oeis.org

13, 19, 31, 43, 53, 61, 71, 73, 101, 103, 109, 113, 131, 139, 151, 157, 173, 181, 191, 193, 199, 229, 233, 239, 241, 251, 269, 271, 283, 293, 311, 313, 349, 353, 373, 379, 409, 419, 421, 433, 439, 443, 463, 491, 499, 509, 523, 571, 577, 593, 599, 601, 607, 613, 619, 643
Offset: 1

Views

Author

Vladimir Shevelev, Aug 13 2009

Keywords

Comments

Let p_k be the k-th prime. A prime p is in the sequence iff the interval of the form (2p_k, 2p_(k+1)), containing p, also contains a prime less than p. The sequence is connected with the following classification of primes: the first two primes 2,3 form a separate set of primes; let p >= 5 be in the interval (2p_k, 2p_(k+1)), then 1) if in this interval there are only primes greater than p, then p is called a right prime; 2) if in this interval there are only primes less than p, then p is called a left prime; 3) if in this interval there are primes both greater and less than p, then p is called a central prime; 4) if this interval does not contain other primes, then p is called an isolated prime. In particular, the right primes form sequence A166307, and all Ramanujan primes (A104272) greater than 2 are either right or central primes; the left primes form sequence A182365, and all Labos primes (A080359) greater than 3 are either left or central primes; the central primes form A166252 and the isolated primes form A166251. [Vladimir Shevelev, Oct 10 2009] [Sequence reference updated by Peter Munn, Jun 01 2023]
Disjoint union of A166252 and A182365. - Peter Munn, Jun 01 2023 [an edited version of a contribution by Vladimir Shevelev in 2009]

Examples

			Let p=53. We see that 2*23<53<2*29. Since the interval (46, 58) contains prime 47<53 and does not contain any prime more than 53, then, by the considered classification 53 is left prime and it is in the sequence. [_Vladimir Shevelev_, Oct 10 2009]
		

Crossrefs

Programs

  • Maple
    isA164333 := proc(n)
            local i ;
            if isprime(n) and n > 3 then
                    for i from (prevprime(n)+1)/2 to (n-1)/2 do
                            if isprime(i) then
                                    return false;
                            end if;
                    end do;
                    return true;
            else
                    false;
            end if;
    end proc:
    for i from 2 to 700 do
            if isA164333(i) then
                    printf("%d,",i);
            end if;
    end do: # R. J. Mathar, Oct 29 2011
  • Mathematica
    kmax = 200; Select[Table[{(Prime[k - 1] + 1)/2, (Prime[k] - 1)/2}, {k, 3, kmax}], AllTrue[Range[#[[1]], #[[2]]], CompositeQ]&][[All, 2]]*2 + 1 (* Jean-François Alcover, Nov 14 2017 *)

Formula

{A080359} union {A164294} = {this sequence} union {2,3}. - Vladimir Shevelev, Oct 29 2011
A164368(2)A164368(3)A164368(4)Vladimir Shevelev, Oct 10 2009]

Extensions

Definition rephrased by R. J. Mathar, Oct 02 2009

A166252 Primes which are not the smallest or largest prime in an interval of the form (2*prime(k),2*prime(k+1)).

Original entry on oeis.org

71, 101, 109, 151, 181, 191, 229, 233, 239, 241, 269, 283, 311, 349, 373, 409, 419, 433, 439, 491, 571, 593, 599, 601, 607, 643, 647, 653, 659, 683, 727, 823, 827, 857, 941, 947, 991, 1021, 1031, 1033, 1051, 1061, 1063, 1091, 1103, 1301, 1373, 1427, 1429
Offset: 1

Views

Author

Vladimir Shevelev, Oct 10 2009, Oct 14 2009

Keywords

Comments

Called "central primes" in A166251, not to be confused with the central polygonal primes A055469.
The primes tabulated in intervals (2*prime(k),2*prime(k+1)) are
5, k=1
7, k=2
11,13, k=3
17,19, k=4
23, k=5
29,31, k=6
37, k=7
41,43, k=8
47,53, k=9
59,61, k=10
67,71,73, k=11
79, k=12
83, k=13
89, k=14
97,101,103, k=15
and only rows with at least 3 primes contribute primes to the current sequence.
For n >= 2, these are numbers of A164368 which are in A194598. - Vladimir Shevelev, Apr 27 2012

Examples

			Since 2*31 < 71 < 2*37 and the interval (62, 74) contains prime 67 < 71 and prime 73 > 71, then 71 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    n = 0; t = {}; While[Length[t] < 100, n++; ps = Select[Range[2*Prime[n], 2*Prime[n+1]], PrimeQ]; If[Length[ps] > 2, t = Join[t, Rest[Most[ps]]]]]; t (* T. D. Noe, Apr 30 2012 *)

A217561 The only prime p such that 3a < p < 3b where a, b are consecutive primes.

Original entry on oeis.org

7, 37, 53, 89, 113, 127, 211, 293, 307, 449, 541, 577, 587, 593, 683, 691, 719, 797, 839, 929, 937, 1259, 1297, 1399, 1471, 1499, 1567, 1709, 1777, 1801, 1811, 1847, 1973, 1979, 2039, 2221, 2467, 2503, 2579, 2633, 2647, 2819, 2939, 3037, 3061, 3109, 3187, 3271
Offset: 1

Views

Author

Zak Seidov, Oct 06 2012

Keywords

Comments

Corresponding values of b-a: 1, 2, 2, 2, 4, 2, 4, 4, 2, 2, 2, 2, 4, 2, 2, 4, 2, 6, 4, 4, 2, 2, 2, 4, 4, 4, 2, 2, 6, 2, 6, 4, 6, 2, 6, 4, 2, 10. In most cases b-a = 2.
3-isolated primes according to the classification given in the paper on link (see Section 10). - Vladimir Shevelev, Oct 07 2012

Examples

			7 is the only prime in the interval [3*2, 3*3] = [6,9],
37 is the only prime in the interval [3*11, 3*13] = [33,39],
53 is the only prime in the interval [3*17, 3*19] = [51,57].
		

Crossrefs

Cf. A166251 (k=2).

Programs

  • Mathematica
    a = 2; b = 3; s = {}; k = 3; Do[If[(p=NextPrime[k*a])< k*b && NextPrime[p] > k*b, AppendTo[s, p]]; a = b; b = NextPrime[b], {100}]; s
    NextPrime/@Transpose[Select[3*Partition[Prime[Range[200]],2,1], NextPrime[ #[[1]]] == NextPrime[#[[2]],-1]&]][[1]] (* Harvey P. Dale, Oct 12 2012 *)

A166307 The smallest prime in some interval of the form (2*prime(k),2*prime(k+1)) if this interval contains at least 2 primes.

Original entry on oeis.org

11, 17, 29, 41, 47, 59, 67, 97, 107, 127, 137, 149, 167, 179, 197, 227, 263, 281, 307, 347, 367, 401, 431, 461, 487, 503, 521, 569, 587, 617, 641, 677, 719, 739, 751, 769, 809, 821, 853, 881, 907, 937, 967, 983, 1009, 1019, 1049, 1087, 1097, 1117, 1151, 1163, 1187, 1217, 1229, 1249, 1277
Offset: 1

Views

Author

Vladimir Shevelev, Oct 11 2009, Oct 17 2009

Keywords

Comments

These are called "right primes" in A166251.

Examples

			For p=29 we have: 2*13 < 29 < 2*17 and interval (26, 29) is free from primes while interval (29, 34) contains a prime. Therefore 29 is in the sequence for k=6.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{t = Select[ Table[i, {i, 2 Prime[n], 2 Prime[n + 1]}], PrimeQ]}, If[ Length@ t > 1, t[[1]], 0]]; Rest@ Union@ Array[f, 115] (* Robert G. Wilson v, May 08 2011 *)

A195871 a(n) is the smallest prime(m) such that the interval (prime(m)*n, prime(m+1)*n) contains exactly one prime.

Original entry on oeis.org

2, 2, 2, 17, 59, 29, 239, 227, 107, 149, 347, 191, 569, 461, 269, 659, 311, 1277, 2711, 821, 1427, 2711, 3581, 1019, 1451, 1319, 9281, 4931, 6269, 5849, 11549, 35729, 8537, 5441, 5741, 10007, 29759
Offset: 2

Views

Author

Vladimir Shevelev, Jan 02 2013

Keywords

Comments

Conjecture: In the supposition that there are infinitely many twin primes, for n>=5 all terms are in A001359 (lesser of twin primes).
Note that a unique prime which is contained in an interval of the form (prime(m)*n, prime(m+1)*n) is called n-isolated (see author's link, where a heuristic proof is given that the number of n-isolated primes<=x approaches e^{-2(n-1)}x/log(x) as x goes to infinity (cf. Conjecture 25, Remark 26 and formula (47)). One can easily prove that a(n) is not bounded.
This conjecture seems hard, since it's not obvious how to find an upper bound for a(n) (see Conjecture 42 in the Shevelev link). - Charles R Greathouse IV, Jan 02 2013

Examples

			Let n=5, and consider intervals of the form (5*prime(m), 5*prime(m+1)).
For 2, 3, 5, ..., the intervals (10,15), (15,25), (25,35), (35,55), (55,65), (65,85), (85,95)... contain 2, 3, 2, 5, 2, 4, 1,... primes. Hence the smallest such prime is 17.
		

Crossrefs

Programs

  • PARI
    a(n)=my(p=2,t);forprime(q=3,,t=0;for(i=p*n+1,q*n-1,if(isprime(i)&&t++>1,break));if(t==1,return(p));p=q) \\ Charles R Greathouse IV, Jan 02 2013

A217566 The only prime p such that 4a < p < 4b where a, b are consecutive primes.

Original entry on oeis.org

11, 23, 47, 167, 409, 719, 769, 907, 911, 1129, 1249, 1259, 1327, 1759, 1831, 1847, 2179, 2281, 2399, 2473, 2579, 3313, 3413, 3433, 3449, 3761, 3967, 4079, 4201, 4373, 4861, 4919, 5113, 5119, 5209, 5227, 5449, 5623, 5711, 5717, 5807, 5927, 5939, 5953, 6173
Offset: 1

Views

Author

Zak Seidov, Oct 06 2012

Keywords

Comments

Corresponding values of b-a: 1, 2, 2, 2, 4, 2, 4, 4, 2, 2, 2, 2, 4, 2, 2, 4, 2, 6, 4, 4, 2, 2, 2, 4, 4, 4, 2, 2, 6, 2, 6, 4, 6, 2, 6, 4, 2, 10. In most cases b-a = 2.
4-isolated primes according to the classification given in the paper on link (see Section 10). - Vladimir Shevelev, Oct 07 2012

Examples

			11 is the only prime in the interval [4*2, 4*3] = [8,12],
23 is the only prime in the interval [4*5, 4*7] = [20,28],
47 is the only prime in the interval [4*11, 4*13] = [44,52].
		

Crossrefs

Cf. A166251 (k=2), A217561 (k=3).

Programs

  • Mathematica
    a = 2; b = 3; s = {}; k = 4; Do[If[(p=NextPrime[k*a]) < k*b && NextPrime[p] > k*b, AppendTo[s, p]]; a = b; b = NextPrime[b], {100}]; s

A182365 The largest prime in some interval of the form (2*prime(k),2*prime(k+1)) if this interval contains at least 2 primes.

Original entry on oeis.org

13, 19, 31, 43, 53, 61, 73, 103, 113, 131, 139, 157, 173, 193, 199, 251, 271, 293, 313, 353, 379, 421, 443, 463, 499, 509, 523, 577, 613, 619, 661, 691, 733, 743, 757, 773, 811, 829, 859, 883, 911, 953, 971, 997, 1013, 1039, 1069, 1093, 1109, 1123, 1153
Offset: 1

Views

Author

Vladimir Shevelev, Apr 26 2012

Keywords

Comments

These are called "left primes" in A166251.

Examples

			For k=6 we have 2*13 < 29 < 31 < 2*17, and the interval contains two primes. Therefore 31 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    n = 0; t = {}; While[Length[t] < 100, n++; ps = Select[Range[2*Prime[n], 2*Prime[n + 1]], PrimeQ]; If[Length[ps] >= 2, AppendTo[t, ps[[-1]]]]]; t (* T. D. Noe, Apr 30 2012 *)

A217577 The only prime p such that k*a < p < k*b where a, b are consecutive primes, case k=5.

Original entry on oeis.org

89, 211, 359, 509, 541, 691, 751, 991, 1201, 1399, 1409, 1559, 1741, 2099, 2161, 2179, 2333, 2503, 2609, 2851, 3089, 3209, 3271, 4111, 4139, 4289, 4297, 4409, 5309, 5591, 6151, 6389, 6397, 6491, 6599, 7283, 7411, 7993, 8039, 8101, 8467, 8609, 8941, 9391, 9661
Offset: 1

Views

Author

Zak Seidov, Oct 07 2012

Keywords

Comments

Corresponding values of b-a: 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 6, 4, 4, 2, 2, 2, 2, 6, 2, 2, 2, 4, 2, 2, 6, 2, 2, 4, 4, 2, 6. In most cases b-a = 2. Smallest n for which b-a = 2(2)26: 1, 10, 16, 62, 119, 414, 939, 2565, 1349, 1042, 10470, 22211, 23553. Also, at n = 43461, b-a = 32.

Examples

			89 is the only prime in the interval [5*17, 5*19] = [85,95],
211 is the only prime in the interval [5*41, 5*43] = [205,215],
359 is the only prime in the interval [5*71, 5*73] = [355,365].
		

Crossrefs

Cf. A166251 (k=2), A217561 (k=3), A217566 (k=4).

Programs

  • Mathematica
    a = 2; b = 3; s = {}; k = 5; Do[If[(p = NextPrime[k*a]) < k*b && NextPrime[p] > k*b, AppendTo[s, p]]; a = b; b = NextPrime[b], {100}]; s

A166574 If p, q are successive primes, and there is a number k with p < k <= q such that r = p+k is a prime, then r is in the sequence.

Original entry on oeis.org

5, 7, 11, 17, 23, 29, 41, 47, 59, 67, 83, 89, 97, 107, 109, 127, 137, 149, 151, 167, 179, 181, 197, 227, 229, 233, 239, 257, 263, 281, 283, 307, 317, 337, 347, 349, 359, 367, 383, 389, 401, 409, 431, 433, 449, 461, 467, 479, 487, 491
Offset: 1

Views

Author

Vladimir Shevelev, Oct 17 2009

Keywords

Comments

The old definition was: Primes p>=5 with the property: if Prime(k)

If A(x) is the counting function of a(n) not exceeding x, then, in view of the symmetry, it is natural to conjecture that A(x)~pi(x)/2.

Examples

			Taking p=2, q=3, k=3 we get r=2+3=5, the first term.
Taking p=3, q=5, k=4 we get r=3+4=7, the second term.
From p=89, q=97 we can take both k=90 and k=92, getting the terms 89+90=179 and 89+92=181. - _Art Baker_, Mar 16 2019
		

Programs

  • Mathematica
    Reap[Do[p=Prime[n]; k=PrimePi[p/2]; If[p<=Prime[k]+Prime[k+1], Sow[p]], {n,3,PrimePi[1000]}]][[2,1]]
    Select[#[[1]]+Range[#[[1]]+1,#[[2]]],PrimeQ]&/@Partition[Prime[Range[60]],2,1]//Flatten (* Harvey P. Dale, Jul 02 2024 *)

Extensions

Extended by T. D. Noe, Dec 01 2010
Edited with simpler definition based on a suggestion from Art Baker. -N. J. A. Sloane, Mar 16 2019
Showing 1-10 of 19 results. Next