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.

A268480 Integers k such that A002110(k) is the average of two consecutive primes.

Original entry on oeis.org

2, 3, 5, 8, 38, 40, 64, 73, 89, 236, 480, 486
Offset: 1

Views

Author

Altug Alkan, Mar 21 2016

Keywords

Comments

In other words, the primorial numbers that are considered are those of the form (p + q)/2 where p and q are consecutive primes. Note that the initial values of (p - q)/2 are 1, 1, 1, 23, 239, 191, 331, 373, 1021.
A088256 is a subsequence of these primorials, which in turn are a subsequence of A024675.
Numbers k such that A038711(k) = A060270(k). - Amiram Eldar, May 19 2024

Examples

			5 is a term because 2*3*5*7*11 = 2310 = (2309 + 2311)/2.
8 is a term because 2*3*5*7*11*13*17*19 = 9699690 = (9699667 + 9699713)/2.
		

Crossrefs

Programs

  • Maple
    P:= 2: count:= 0:
    for n from 2 to 500 do
      P:= P*ithprime(n);
      # first try d=1
      if isprime(P+1) then
        good:= isprime(P-1);
      elif isprime(P-1) then good:= false
      else
        for d from ithprime(n+1) by 2 do
          if igcd(d,P) > 1 then next fi;
          if isprime(P+d) then
            good:= isprime(P-d); break
          elif isprime(P-d) then
            good:= false; break
          fi
        od;
      fi;
      if good then
         count:= count+1;
         A[count]:= n;
      fi
    od:
    seq(A[i],i=1..count);  # Robert Israel, Aug 29 2016
  • Mathematica
    prim[n_] := Times @@ Prime[Range[n]]; Select[Range[2, 100], Total[NextPrime[(p = prim[#]), {-1, 1}]] == 2*p &] (* Amiram Eldar, May 19 2024 *)
  • PARI
    a002110(n) = prod(k=1, n, prime(k));
    for(n=2, 1e3, if((nextprime(a002110(n)) - a002110(n)) == (a002110(n) - precprime(a002110(n))), print1(n, ", ")))