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.

A333058 0, 1, or 2 primes at primorial(n) +- 1.

This page as a plain text file.
%I A333058 #102 Sep 05 2023 05:48:16
%S A333058 1,1,2,2,1,2,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
%T A333058 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
%U A333058 1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
%N A333058 0, 1, or 2 primes at primorial(n) +- 1.
%C A333058 a(n) = 0 marks a prime gap size of at least 2*prime(n+1)-1, e.g., primorial(8) +- prime(9) = {9699667,9699713} are primes, gap 2*23-1.
%C A333058 Mathworld reports that it is not known if there are an infinite number of prime Euclid numbers.
%C A333058 The tables in Ondrejka's collection contain no further primorial twin primes after {2309,2311} = primorial(13) +- 1 up to primorial(15877) +- 1 with 6845 digits.
%D A333058 H. Dubner, A new primorial prime, J. Rec. Math., 21 (No. 4, 1989), 276.
%H A333058 Chris K. Caldwell, <a href="https://primes.utm.edu/top20/page.php?id=5">the top 20: Primorial</a>, 2012.
%H A333058 H. Dubner & N. J. A. Sloane, <a href="https://oeis.org/A002981/a002981.pdf">Correspondence, 1991,</a> on A005234.
%H A333058 G. L. Honaker, Jr. and Chris Caldwell, <a href="https://primes.utm.edu/curios/page.php?short=30029">Prime Curios! 30029</a>.
%H A333058 G. L. Honaker, Jr. and Chris Caldwell, <a href="https://primes.utm.edu/curios/page.php?short=9699667">Prime Curios! 9699667</a>.
%H A333058 Rudolf Ondrejka, <a href="https://primes.utm.edu/lists/top_ten/topten.pdf">The Top Ten: a Catalogue of Primal Configurations</a>, 2001, tables 20, 20A, 20B.
%H A333058 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimorialPrime.html">Primorial Prime</a>.
%H A333058 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/EuclidNumber.html">Euclid Number</a>.
%F A333058 a(n) = [ isprime(primorial(n) - 1) ] + [ isprime(primorial(n) + 1) ].
%F A333058 a(n) = Sum_{i in {-1,1}} A010051(primorial(n) + i).
%e A333058 a(2) = a(3) = a(5) = 2: 2*3 +-1 = {5,7}, 6*5 +-1 = {29,31} and 210*11 +-1 = {2309,2311} are twin primes.
%e A333058 a(1) = a(4) = a(6) = 1: 1, 30*7 - 1 = 209 and 2310*13 + 1 = 30031 are not primes.
%e A333058 a(7) = 0: 510509 = 61 * 8369 and 510511 = 19 * 26869 are not primes.
%p A333058 p:= proc(n) option remember; `if`(n<1, 1, ithprime(n)*p(n-1)) end:
%p A333058 a:= n-> add(`if`(isprime(p(n)+i), 1, 0), i=[-1, 1]):
%p A333058 seq(a(n), n=0..120);  # _Alois P. Heinz_, Mar 18 2020
%t A333058 primorial[n_] := primorial[n] = Times @@ Prime[Range[n]];
%t A333058 a[n_] := Boole@PrimeQ[primorial[n] - 1] + Boole@PrimeQ[primorial[n] + 1];
%t A333058 a /@ Range[0, 105] (* _Jean-François Alcover_, Nov 30 2020 *)
%o A333058 (Rexx)
%o A333058 S = ''                     ;  Q = 1
%o A333058 do N = 1 to 27
%o A333058    Q = Q * PRIME( N )
%o A333058    T = ISPRIME( Q - 1 ) + ISPRIME( Q + 1 )
%o A333058    S = S || ',' T
%o A333058 end N
%o A333058 S = substr( S, 3 )
%o A333058 say S                      ;  return S
%Y A333058 Cf. A096831, A002110 (primorials, p#), A057706.
%Y A333058 Cf. A006862 (Euclid, p#+1), A005234 (prime p#+1), A014545 (index prime p#+1).
%Y A333058 Cf. A057588 (Kummer, p#-1), A006794 (prime p#-1), A057704 (index prime p#-1).
%Y A333058 Cf. A010051, A088411 (where a(n) is positive), A088257.
%K A333058 nonn
%O A333058 0,3
%A A333058 _Frank Ellermann_, Mar 06 2020