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

A084704 Smallest prime p > prime(n) such that (p + prime(n))/2 is prime.

Original entry on oeis.org

7, 17, 19, 23, 61, 29, 43, 59, 53, 43, 97, 53, 79, 59, 89, 83, 73, 79, 107, 181, 127, 131, 113, 109, 113, 151, 167, 193, 149, 151, 167, 197, 163, 197, 163, 229, 199, 179, 281, 347, 241, 263, 229, 257, 223, 271, 331, 239, 313, 269, 263, 313, 263, 269, 359, 293
Offset: 2

Views

Author

Amarnath Murthy, Jun 08 2003

Keywords

Comments

Subsidiary sequences: (1) Sequence of primes for a given prime p such that (p+q)/2 is a prime iff q belongs to this sequence. For example, for p = 5 the sequence is 17, 29, 41, 53, 89,...
Note that actually a(n) > prime(n+1) in all cases - because there is no prime between prime(n) and prime(n+1). - Zak Seidov, Jul 24 2013.
For n>2, a(n)-prime(n) is a multiple of 12. - Zak Seidov, Oct 15 2015
[Proof: the sequence searches prime triples prime(n)R. J. Mathar, Oct 16 2015]

Crossrefs

Programs

  • Maple
    A084704 := proc(n)
        local p,a,q ;
        p := ithprime(n) ;
        a := nextprime(p) ;
        while not isprime((a+p)/2) do
            a := nextprime(a) ;
        end do:
        return a;
    end proc: # R. J. Mathar, Oct 16 2015
  • Mathematica
    Table[p = q = Prime[n]; While[q = NextPrime[q]; ! PrimeQ[(p + q)/2]]; q, {n, 2, 100}] (* T. D. Noe, Apr 20 2011 *)
    p=2; Table[p=NextPrime[p]; q=NextPrime[p,2]; While[!PrimeQ[(p+q)/2], q=NextPrime[q]]; q, {99}] (* Zak Seidov, Jul 24 2013 *)
  • PARI
    a(n) = {q = prime(n); p = nextprime(q+1); while (!isprime((q+p)/2), p = nextprime(p+1)); p;} \\ Michel Marcus, Oct 15 2015

Extensions

More terms from David Wasserman, Jan 03 2005

A224895 Let p = prime(n). Smallest odd number m > p such that m + p is semiprime.

Original entry on oeis.org

7, 7, 9, 15, 15, 21, 21, 27, 35, 33, 43, 45, 45, 51, 59, 65, 63, 73, 75, 75, 85, 87, 95, 105, 105, 105, 111, 111, 117, 141, 135, 143, 141, 159, 153, 163, 169, 171, 179, 185, 183, 201, 195, 201, 201, 223, 235, 231, 231, 237, 245, 243, 261, 263, 269, 275, 273
Offset: 1

Views

Author

Zak Seidov, Jul 24 2013

Keywords

Comments

Apparently a(n) = A210497(n) for n>1, which basically indicates that the search for the smallest even semiprime larger than 2*prime(n) produces 2*prime(n+1). - R. J. Mathar, Jul 27 2013
a(n) <= A165138(n); a(n) = A165138(n) when a(n) is prime, corresponding n's: 1, 2, 11, 15, 18, 36, 39, 46, 54, 55, 58, 73, 91,.. .
Also of interest is that sequence in not monotonic: e.g., a(10) - a(9) = 33 - 35 = -2, a(31) - a(30) = 135 - 141 = -6.

Examples

			2 + 7 = 9 = 3*3, 3 + 7 = 10 = 2*5, 5 + 9 = 14 = 2*7.
		

Crossrefs

Programs

  • Maple
    A224895 := proc(n)
        local p,m ;
        p := ithprime(n) ;
        for m from p+1 do
            if type(m,'odd') and numtheory[bigomega](m+p) = 2 then
                return m ;
            end if;
        end do:
    end proc: # R. J. Mathar, Jul 28 2013
  • Mathematica
    Reap[Sow[7];Do[p=Prime[n];k=p+2;While[!PrimeQ[r=(p+k)/2],k=k+2];Sow[k],{n,2,100}]][[2,1]]
    son[n_]:=Module[{m=If[EvenQ[n],n+1,n+2]},While[PrimeOmega[n+m]!=2,m = m+2]; m]; Table[son[n],{n,Prime[Range[60]]}] (* Harvey P. Dale, Apr 24 2017 *)
Showing 1-2 of 2 results.