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

A088257 Primorials P which have at least one prime neighbor; i.e., P+1 or P-1 or both are primes.

Original entry on oeis.org

1, 2, 6, 30, 210, 2310, 30030, 200560490130, 304250263527210, 23768741896345550770650537601358310
Offset: 1

Views

Author

Amarnath Murthy, Sep 27 2003

Keywords

Comments

A supersequence of A088256.
Next term a(11) is 131 digits and is too large to include.

Crossrefs

Programs

  • Mathematica
    Select[FoldList[Times,1,Prime[Range[70]]],PrimeQ[#-1]||PrimeQ[#+1]&] (* Harvey P. Dale, Oct 22 2011 *)

Extensions

More terms from Ray Chandler, Sep 28 2003

A088258 Factorials F which have at least one prime neighbor, i.e., F+1 or F-1 or both are primes.

Original entry on oeis.org

1, 2, 6, 24, 720, 5040, 39916800, 479001600, 87178291200, 10888869450418352160768000000, 265252859812191058636308480000000, 263130836933693530167218012160000000
Offset: 1

Views

Author

Amarnath Murthy, Sep 27 2003

Keywords

Comments

Conjecture: sequence is infinite. But there are finitely many members which are sandwiched between twin primes.

Examples

			2 is in the sequence because 2 + 1 is prime.
6 is in the sequence because both 6 - 1 and 6 + 1 are prime.
24 is in the sequence because 24 - 1 is prime.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(t+1) or isprime(t-1), [seq(n!,n=1..100)]); # Robert Israel, Aug 25 2016
  • Mathematica
    Select[Range[32]!, Or @@ PrimeQ@ {# - 1, # + 1} &] (* Michael De Vlieger, Aug 25 2016 *)

Formula

a(n) = A088412(n)! = A000142(A088412(n)). - Robert Israel, Aug 25 2016

Extensions

More terms from Ray Chandler, Sep 28 2003

A088259 Perfect powers which have at least one prime neighbor.

Original entry on oeis.org

1, 4, 8, 16, 32, 36, 100, 128, 196, 256, 400, 576, 676, 1296, 1600, 2916, 3136, 4356, 5476, 7056, 8100, 8192, 8836, 12100, 13456, 14400, 15376, 15876, 16900, 17956, 21316, 22500, 24336, 25600, 28900, 30976, 32400, 33856, 41616, 42436, 44100
Offset: 1

Views

Author

Amarnath Murthy, Sep 27 2003

Keywords

Comments

If K is a term and K-1 is the neighboring prime then it must be a Mersenne prime.
Conjecture: sequence is infinite.

Crossrefs

Intersection of A001597 and A045718.

Programs

  • Mathematica
    Join[{1},Select[Range[45000],GCD@@FactorInteger[#][[All,2]]>1 && AnyTrue[ #+{1,-1},PrimeQ]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 05 2020 *)

Extensions

Corrected and extended by Ray Chandler, Sep 28 2003
Offset changed by Andrew Howroyd, Sep 22 2024

A382785 a(n) is the least multiple of the n-th primorial such that both a(n)-1 and a(n)+1 are prime and the prime factors of a(n) do not exceed prime(n).

Original entry on oeis.org

4, 6, 30, 420, 2310, 180180, 4084080, 106696590, 892371480, 103515091680, 4412330782860, 29682952539240, 22514519501013540, 313986271960080720, 22750921955774182170, 912496437361321252440, 26918644902158976946980, 1290172194953476680815970, 1901713815361424627522739780
Offset: 1

Views

Author

Rory Pulvino, Apr 04 2025

Keywords

Comments

a(n) is the smallest multiple k of the n-th primorial, prime(n)#, such that both k-1 and k+1 are prime and the prime factors of m = k/prime(n)# do not exceed prime(n).
From Michael S. Branicky, Apr 19 2025: (Start)
a(n) first differs from A060255(n) + 1 at n = 29.
a(349) has 1001 digits. (End)

Examples

			For a(2), (2*3)*1 = 6 and the first twin primes are 5, 7.
For a(3), (2*3*5)*1 = 30 and the first twin primes are 29, 31.
For a(4), (2*3*5*7)*2 = 420, the first twin primes are 419, 421 and 2 <= prime(4).
For a(5), (2*3*5*7*11)*1 = 2310 and the first twin primes are 3209, 3211.
For a(6), (2*3*5*7*11*13)*2*3 = 180180. the first twin primes are 180179, 180181 and 2, 3 <= prime(6).
		

Crossrefs

Supersequence of A088256.

Programs

  • Mathematica
    a[n_] := Module[{P,k},P=Product[Prime[i],{i, 1, n}];k = 1; While[!(PrimeQ[k*P-1] && PrimeQ[k*P+1]), k++];k*P] (* James C. McMahon, May 09 2025 *)
  • PARI
    isok(k, p) = if (k>1, vecmax(factor(k)[,1])<=p, 1);
    a(n) = my(P=vecprod(primes(n)), k=1, p=prime(n)); while(!(isok(k, p) && ispseudoprime(k*P-1) && ispseudoprime(k*P+1)), k++); k*P; \\ Michel Marcus, Apr 27 2025
  • Python
    from itertools import count
    from sympy import factorint, isprime, prime, primorial
    def a(n):
        pn, prn = prime(n), primorial(n)
        return next(k for m in count(1) if max(factorint(m), default=1)<=pn and isprime((k:=m*prn)-1) and isprime(k+1))
    print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Apr 18 2025
    

Extensions

Data corrected by Michael S. Branicky, Apr 18 2025

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, ", ")))
Showing 1-5 of 5 results.