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

A164368 Primes p with the property: if q is the smallest prime > p/2, then a prime exists between p and 2q.

Original entry on oeis.org

2, 11, 17, 29, 41, 47, 59, 67, 71, 97, 101, 107, 109, 127, 137, 149, 151, 167, 179, 181, 191, 197, 227, 229, 233, 239, 241, 263, 269, 281, 283, 307, 311, 347, 349, 367, 373, 401, 409, 419, 431, 433, 439, 461, 487, 491, 503, 521, 569, 571, 587, 593, 599, 601, 607
Offset: 1

Views

Author

Vladimir Shevelev, Aug 14 2009

Keywords

Comments

The Ramanujan primes possess the following property:
If p = prime(n) > 2, then all numbers (p+1)/2, (p+3)/2, ..., (prime(n+1)-1)/2 are composite.
The sequence equals all primes with this property, whether Ramanujan or not.
All Ramanujan primes A104272 are in the sequence.
Every lesser of twin primes (A001359), beginning with 11, is in the sequence. - Vladimir Shevelev, Aug 31 2009
109 is the first non-Ramanujan prime in this sequence.
A very simple sieve for the generation of the terms is the following: let p_0=1 and, for n>=1, p_n be the n-th prime. Consider consecutive intervals of the form (2p_n, 2p_{n+1}), n=0,1,2,... From every interval containing at least one prime we remove the last one. Then all remaining primes form the sequence. Let us demonstrate this sieve: For p_n=1,2,3,5,7,11,... consider intervals (2,4), (4,6), (6,10), (10,14), (14,22), (22,26), (26,34), ... . Removing from the set of all primes the last prime of each interval, i.e., 3,5,7,13,19,23,31,... we obtain 2,11,17,29, etc. - Vladimir Shevelev, Aug 30 2011
This sequence and A194598 are the mutually wrapping up sequences:
A194598(1) <= a(1) <= A194598(2) <= a(2) <= ...
From Peter Munn, Oct 30 2017: (Start)
The sequence is the list of primes p = prime(k) such that there are no primes between prime(k)/2 and prime(k+1)/2. Changing "k" to "k-1" and therefore "k+1" to "k" produces a definition very similar to A164333's: it differs by prefixing an initial term 3. From this we get a(n+1) = prevprime(A164333(n)) = A151799(A164333(n)) for n >= 1.
The sequence is the list of primes that are not the largest prime less than 2*prime(k) for any k, so that - as a set - it is the complement relative to A000040 of the set of numbers in A059788.
{{2}, A166252, A166307} is a partition.
(End)

Examples

			2 is in the sequence, since then q=2, and there is a prime 3 between 2 and 4. - _N. J. A. Sloane_, Oct 15 2009
		

Crossrefs

Cf. Ramanujan primes, A104272, and related sequences: A164288, A080359, A164294, A193507, A194184, A194186.
A001359, A166252, A166307 are subsets.
Cf. A001262, A001567, A062568, A141232 (all relate to pseudoprimes to base 2).

Programs

  • Maple
    a:= proc(n) option remember; local q, k, p;
          k:= nextprime(`if`(n=1, 1, a(n-1)));
          do q:= nextprime(floor(k/2));
             p:= nextprime(k);
             if p<2*q then break fi;
             k:= p
          od; k
        end:
    seq(a(n), n=1..55);  # Alois P. Heinz, Aug 30 2011
  • Mathematica
    Reap[Do[q=NextPrime[p/2]; If[PrimePi[2*q] != PrimePi[p], Sow[p]], {p, Prime[Range[100]]}]][[2, 1]]
    (* Second program: *)
    fQ[n_] := PrimePi[ 2NextPrime[n/2]] != PrimePi[n];
    Select[ Prime@ Range@ 105, fQ]
  • PARI
    is(n)=nextprime(n+1)<2*nextprime(n/2) && isprime(n) \\ Charles R Greathouse IV, Apr 24 2015

Formula

As a set, this sequence = A000040 \ A059788 = A000040 \ prevprime(2*A000040) = A000040 \ A151799(A005843(A000040)). - Peter Munn, Oct 30 2017

Extensions

Definition clarified and simplified by Jonathan Sondow, Oct 25 2011

A193507 Ramanujan primes of the second kind: a(n) is the smallest prime such that if prime x >= a(n), then pi(x) - pi(x/2) >= n, where pi(x) is the number of primes <= x.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Aug 18 2011

Keywords

Comments

Apparently A168425 and the 2. - R. J. Mathar, Aug 25 2011
An odd prime p is in the sequence iff the previous prime is Ramanujan. The Ramanujan primes and the Ramanujan primes of the second kind are the mutually wrapping up sequences: a(1)<=R_1<=a(2)<=R_2<=a(3)<=R_3<=.... . - Vladimir Shevelev, Aug 29 2011
All terms of the sequence are in A194598. - Vladimir Shevelev, Aug 30 2011

Examples

			Since R_2=11 (see A104272), then for x >= 11, we have pi(x) - pi(x/2) >= 2. However, if to consider only prime x, then we see that, for x=7,5,3, pi(x) - pi(x/2)= 2, but pi(2) - pi(1)= 1. Therefore, already for prime x>=3, we have pi(x) - pi(x/2) >= 2. Thus a(2)=3.
		

Crossrefs

Cf. A104272 (Ramanujan primes).

Programs

  • Mathematica
    nn = 120; (* nn=120 returns 54 terms *)
    R = Table[0, {nn}]; s = 0;
    Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, R[[s + 1]] = k], {k, Prime[3 nn]}];
    A104272 = R + 1;
    Join[{2}, Select[Prime[Range[nn]], MemberQ[A104272, NextPrime[#, -1]]&]] (* Jean-François Alcover, Nov 07 2018, after T. D. Noe in A104272 *)

Formula

A080359(n) <= a(n) <= A104272(n) = R_n (Cf. A194184, A194186).
a(n)>p_(2*n-1); a(n)~p_{2n} (Cf. properties of R_n in A104272 and the above comment). - Vladimir Shevelev, Aug 28 2011

A194186 a(n) = A193507(n) - A080359(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 12, 0, 0, 0, 0, 36, 34, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Vladimir Shevelev, Aug 18 2011

Keywords

Comments

Conjecture: The sequence is unbounded.
Records are 0, 18, 36, 48, 52, ... with indices 1, 14, 20, 44, 96, ...
The places of nonzero terms correspond to places of those terms of A193507 which are in A164294. Conjecture: The asymptotic density of nonzero terms is 2/(e^2+1). A heuristic proof follows from the comment to A193507 and the first reference there.

Crossrefs

A182366 Records in A194217.

Original entry on oeis.org

8, 10, 24, 36, 60, 64, 84, 114, 124, 144, 202, 226, 228
Offset: 1

Views

Author

Vladimir Shevelev, Apr 26 2012

Keywords

Comments

Records in A194217(n) occur at n = 2, 4, 10, 14, 43, 95, 145, 167, 287, 415, 560, 635, 982,...

Crossrefs

A194217 a(n) = A104272(n)-A080359(n).

Original entry on oeis.org

0, 8, 4, 10, 10, 4, 6, 6, 0, 24, 0, 4, 18, 36, 12, 10, 6, 0, 36, 36, 34, 0, 0, 12, 0, 10, 24, 18, 34, 0, 14, 0, 22, 0, 0, 10, 0, 0, 18, 24, 0, 4, 60, 48, 10, 0, 0, 0, 0, 28, 24, 0, 0, 0, 16, 36, 36, 6, 8, 12, 36, 10, 0, 0, 24, 0, 22, 54, 30, 0, 14, 12, 18, 22
Offset: 1

Views

Author

Vladimir Shevelev, Aug 18 2011

Keywords

Comments

Conjecture: Asymptotic density of nonzero terms is 3/4.

Crossrefs

Programs

  • Mathematica
    nn = 100;
    R = Table[0, {nn}]; s = 0;
    Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, R[[s+1]] = k], {k, Prime[3nn]}
    ];
    A104272 = R = R + 1;
    T = Table[0, {nn + 1}]; s = 0;
    Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s <= nn && T[[s+1]] == 0, T[[s+1]] = k], {k, Prime[3nn]}
    ];
    A080359 = Rest[T];
    A104272 - A080359 (* Jean-François Alcover, Aug 19 2018, after T. D. Noe *)

A195184 Interspersion fractally induced by the prime marker sequence A089026.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 7, 12, 13, 14, 11, 15, 18, 19, 20, 17, 21, 16, 24, 25, 26, 23, 27, 22, 28, 32, 33, 34, 31, 35, 30, 36, 29, 41, 42, 43, 40, 44, 39, 45, 38, 37, 51, 52, 53, 50, 54, 49, 55, 48, 47, 46, 61, 62, 63, 60, 64, 59, 65, 58, 57, 56, 66, 73, 74, 75
Offset: 1

Views

Author

Clark Kimberling, Sep 10 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence. Every pair of rows eventually intersperse. As a sequence, A194184 is a permutation of the positive integers, with inverse A195185. (The prime marker sequence A089026 is given by p(n)=n if n is prime and p(n)=1 otherwise).

Examples

			Northwest corner:
1...2...4...8...12..18..24..32
3...5...9...13..19..26..33..42
6...10..14..20..26..34..43..53
7...11..17..23..31..40..50..60
15..21..27..35..44..54..64..76
		

Crossrefs

Programs

  • Mathematica
    p[n_] := If[PrimeQ[n], n, 1]
    Table[p[n], {n, 1, 90}]  (* A089026 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20] (* A195183 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13}, {k, 1, n}]]  (* A195184 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n], {n, 1, 80}]]  (* A195185 *)

A182391 Numbers n for which A104272(n) = A080359(n).

Original entry on oeis.org

1, 9, 11, 18, 22, 23, 25, 30, 32, 34, 35, 37, 38, 41, 46, 47, 48, 49, 52, 53, 54, 63, 64, 66, 70, 75, 76, 79, 80, 82, 84, 94, 98, 99, 101, 102, 105, 108, 109, 110, 113, 114, 115, 124, 127, 128, 131, 135, 136, 139, 140, 148, 149, 150, 151, 154, 156, 158, 160
Offset: 1

Views

Author

Vladimir Shevelev, Apr 27 2012

Keywords

Comments

Number m is in the sequence iff 1) there exists only composite number k such that 2*k-1 is prime and A060715(k)=m; 2) there is no prime p such that 2*p-1 is prime and A060715(p)=m-1.

Crossrefs

Formula

A194217(n)=0.

A182392 Numbers n for which there exists only composite number k such that A060715(k) = n and 2*k-1 is prime, but A104272(n) differs from A080359(n).

Original entry on oeis.org

3, 8, 36, 55, 58, 83, 129, 134, 143, 155, 186, 197, 207, 218, 269, 295, 309, 310, 361, 362, 380, 396, 412, 454, 466, 473, 505, 511, 514, 544, 549, 556, 563, 616, 631, 660, 666, 677, 683, 697, 771, 781, 788, 797, 812, 873, 874, 881, 883, 894, 906, 953
Offset: 1

Views

Author

Keywords

Comments

There exists a prime p=p(n) such that 2*p-1 is prime and A060715(p)=a(n)-1 (cf. comment in A182391).

Crossrefs

Showing 1-8 of 8 results.