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.

A038767 Numbers k for which k-th primorial + square of (k+1)-th prime is also a prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 13, 19, 28, 41, 66, 85, 371, 437, 726, 924, 1063, 3401, 6714
Offset: 1

Views

Author

Labos Elemer, May 04 2000

Keywords

Comments

r = prime(n+1)^2 is the smallest possible composite number that, if added to the n-th primorial, might give a prime.

Examples

			a(5)=6, 6th primorial is 30030, square of 7th prime is 289, sum gives 30319, a prime.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {}, p = 1, q = 1}, Do[q = NextPrime[q]; If[PrimeQ[p + q^2], AppendTo[a, i]]; p *= q, {i, 1200}]; Rest[a] - 1] (* Michael De Vlieger, Jan 03 2021 *)
  • PARI
    isok(n) = ispseudoprime(prime(n+1)^2 + prod(j=1, n, prime(j))); \\ Michel Marcus, Aug 26 2019

Formula

a(n) = A002110(n) + prime(n+1)^2 is prime; n so that A054758(n)=1.

Extensions

a(12)-a(14) from Michel Marcus, Aug 26 2019
a(15)-a(16) (due to Jon E. Schoenfield at A245694) from Bill McEachen, Jan 03 2021
a(17) from Michael S. Branicky, Jun 09 2023
a(18) from Michael S. Branicky, Aug 09 2024