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.

A259560 Primes p such that p = 2kq + 1 for k a positive integer, q an odd prime and 2k <= q - 3.

Original entry on oeis.org

11, 23, 29, 47, 53, 59, 67, 79, 83, 89, 103, 107, 131, 137, 139, 149, 167, 173, 179, 191, 223, 227, 229, 233, 239, 263, 269, 277, 283, 293, 311, 317, 347, 349, 359, 367, 373, 383, 389, 431, 439, 461, 467, 479, 499, 503, 509, 523, 557, 563, 569, 587, 593, 607
Offset: 1

Views

Author

Keywords

Comments

This sequence is associated with the conjecture in A245664 that p + q is prime-partitionable.
There are 138438 values of p in the first 216816 primes, i.e., 63.85%, all of which are distinct.

Examples

			The table lists values of n, q, 2k and p for 1 <= n <= 20.
.n      q     2k      p (a(n))
.1      5      2     11
.2     11      2     23
.3      7      4     29
.4     23      2     47
.5     13      4     53
.6     29      2     59
.7     11      6     67
.8     13      6     79
.9     41      2     83
10     11      8     89
11     17      6    103
12     53      2    107
13     13     10    131
14     17      8    137
15     23      6    139
16     37      4    149
17     83      2    167
18     43      4    173
19     89      2    179
20     19     10    191
		

Crossrefs

Programs

  • Maple
    ppgen := proc (n)
      local i, j, k, nprimes, p1a, p1b, p1b_ind, pless, pless_idx, p1b_ind_num_0, p1b_ind_num_1;
      pless := {};
      for i from 3 to n do
        if isprime(i) then
          pless := `union`(pless, {i})
        end if
      end do;
      nprimes := numelems(pless);
      p1b_ind := Vector(nprimes);
      for j to nprimes do
        p1a := pless[j];
        if (1/2)*pless[-1]+1/2 < p1a then
          break
        end if;
        for k to (1/2)*p1a-3/2 do
          p1b := 2*k*p1a+1;
          if member(p1b, pless, 'pless_idx') then
            p1b_ind[pless_idx] := 1
          elif pless[-1] < p1b then
            break
          end if
        end do
      end do;
      p1b_ind_num_0 := 1;
      p1b_ind_num_1 := 0;
      for i to nprimes do
        if p1b_ind[i] = 0 then
          p1b_ind_num_0 := p1b_ind_num_0+1
        else
          p1b_ind_num_1 := p1b_ind_num_1+1;
          fprintf(fop, "%d %d\n", p1b_ind_num_1, pless[i])
        end if
      end do
    end proc;
    n := 376200;
    ppgen(n);
  • PARI
    is(n)=my(f=factor(n\2)[,1]); for(i=1,#f, if(n\2/f[i]*2<=f[i]-3, return(isprime(n)))); 0 \\ Charles R Greathouse IV, Jul 15 2015