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.

A088411 A088257 indexed by A002110.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 11, 13, 24, 66, 68, 75, 167, 171, 172, 287, 310, 352, 384, 457, 564, 590, 616, 620, 643, 849, 1391, 1552, 1613, 1849, 2122, 2647, 2673, 4413, 13494, 31260, 33237, 67132, 85586, 234725
Offset: 1

Views

Author

Ray Chandler, Sep 29 2003

Keywords

Comments

Union of A057704 and A014545. - Jeppe Stig Nielsen, Aug 01 2019

Examples

			3 is in the sequence because primorial p_3# = 2 * 3 * 5 = 30 has two prime neighbors 29 and 31.
4 is in the sequence because primorial p_4# = 2 * 3 * 5 * 7 = 210 has one prime neighbor 211; 209 = 11 * 19.
7 is not in the sequence because the product of the smallest 7 primes has two composite neighbors.
		

Crossrefs

Programs

  • Maple
    A:= NULL:
    P:= 1: p:= 1;
    for n from 1 to 700 do
      p:= nextprime(p);
      P:= P*p;
      if isprime(P+1) or isprime(P-1) then A:= A, n fi
    od:
    A; # Robert Israel, Aug 03 2016
  • Mathematica
    Select[Range[0, 600], Total@ Boole@ PrimeQ@ {# - 1, # + 1} > 0 &@ Apply[Times, Prime@ Range@ #] &] (* Michael De Vlieger, Aug 03 2016 *)
  • PARI
    is(k)=pr=prod(j=1,k,prime(j));ispseudoprime(pr-1)||ispseudoprime(pr+1) \\ Jeppe Stig Nielsen, Aug 01 2019

Formula

a(n)=k such that A088257(n)=A002110(k).

Extensions

a(22)-a(27) from Michael De Vlieger, Aug 03 2016
a(28)-a(40) from Jeppe Stig Nielsen, Aug 01 2019
a(41) from Jeppe Stig Nielsen, Oct 19 2021